Skip to content

sine-fdn/act

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

ACT (beta)

ACT (Automated Conformance Testing) tests your software solution against the PACT Technical Specifications.

For this, ACT performs the tests included in PACT's checklist, ensuring that your software is ready for bilateral conformance testing.

By integrating ACT into your CI/CD pipeline and development processes, you can streamline the PACT Tech Specs implementation and conformance process in general.

Note

ACT is still under development. This means that the tool is not yet fully stable and may not cover all the requirements of the PACT Technical Specifications or that its tests may differ from the Tech Specs.

If you encounter any issues or difficulties, give us feedback, open an issue on the ACT GitHub repository.

Usage

You can use ACT in the CLI or in a GitHub workflow.

All you need to do is to adapt below commands to your environment and run them in your terminal or in your GitHub workflow:

curl -sSf https://raw.githubusercontent.com/sine-fdn/act/main/act.sh |\
  bash -s -- test -e "<url>" -u "<user>" -p "<password>"

(i.e. <user>, <password> etc. are placeholders for your actual client credentials)

Example usage with SINE's iLEAP demo API

curl -sSf https://raw.githubusercontent.com/sine-fdn/act/main/act.sh |\
  bash -s -- test -e "https://api.ileap.sine.dev" -u "hello" -p "pathfinder" \

GitHub Workflow

Adding ACT to your CI/CD pipeline with GitHub is as simple as including the following job in your GitHub workflow, replacing <url>, <user>, and <password> with the URL of your API and the Basic Auth credentials (user and password).

  act_test:
    name: ACT Test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Run ACT (test)
        run: |
          set -o pipefail
          curl -sSf https://raw.githubusercontent.com/sine-fdn/act/main/act.sh | \
          bash -s -- test \
          -e `<url>` \
          -u `<user>` \
          -p `<password>` \
          --skip-http-check

Security Considerations

If you intend to use this action to test live or otherwise production-like systems, you should

  1. make sure that credentials are passed in as secrets (e.g., ${{secrets.ACT_USER}} and ${{secrets.ACT_PASSWORD}})
  2. add the --enable-http-check flag

Limitations

Important

There are builds ready for ARM64 and x86_64 architectures and the ubuntu-latest runner only. If you need support for a different architecture or runner, please let us know.

We are working to enlarge the coverage of ACT. Most test cases are already covered, but these do not yet include the tests concerning expired tokens, nor some of the asynchronous tests. Below is a detailed list of the test cases that are currently covered by ACT.

Coverage

PACT Test Cases

  • Test Case 001: Authentication against default endpoint
  • Test Case 002: Authentication with invalid credentials against default endpoint
  • Test Case 003: Get All Footprints
  • Test case 004: Get Limited List of Footprints
  • Test case 005: Pagination link implementation of Action ListFootprints
  • Test Case 006: Attempt ListFootprints with Expired Token
  • Test Case 007: Attempt ListFootprints with Invalid Token
  • Test Case 008: Get Footprint
  • Test Case 009: Attempt GetFootprint with Expired Token
  • Test Case 010: Attempt GetFootprint with Invalid Token
  • Test Case 011: Attempt GetFootprint with Non-Existent PfId
  • Test Case 012: Asynchronous PCF Request
  • Test Case 013: Respond to Asynchronous PCF Request
  • Test Case 014: Receive Notification of PCF Update
  • Test Case 015: Notify of PCF Update
  • Test Case 016: OpenId Connect-based Authentication Flow
  • Test Case 017: OpenId connect-based authentication flow with incorrect credentials
  • Test Case 018: Attempt Authentication through HTTP (non-HTTPS)
  • Test Case 019: Attempt ListFootprints through HTTP (non-HTTPS)
  • Test Case 020: Get Filtered List of Footprints
  • Test Case 021: Attempt GetFootprint through HTTP (non-HTTPS)
  • Test Case 022: Attempt Action Events with Expired Token
  • Test Case 023: Attempt Action Events with Invalid Token
  • Test Case 024: Attempt Action Events through HTTP (non-HTTPS)

iLEAP Test Cases

  • iLEAP Test Case 001: Get ProductFootprint with ShipmentFootprint
  • iLEAP Test Case 002: Get ProductFootprint with TOC
  • iLEAP Test Case 003: Get ProductFootprint with HOCs
  • iLEAP Test Case 004: Get All TransportActivityData
  • iLEAP Test Case 005: Get Filtered List of TransportActivityData
  • iLEAP Test Case 006: Get Limited List of TransportActivityData
  • iLEAP Test Case 007: Attempt TransportActivityData with Invalid Token
  • iLEAP Test Case 008: Attempt TransportActivityData with Expired Token

Contact

For any questions, feedback, or issues, please contact us at act-feedback@sine.dev.

Releases

No releases published

Packages

No packages published

Languages