Skip to content

CI CD Integration⚓︎

GitHub Actions⚓︎

Test & import test execution to AgileTest with GitHub Actions.

Cloud Edition⚓︎

A working sample repo is available at AgileTestApp/sample-automation-test-import. See test-and-upload-report.yml for a sample GitHub Actions workflow that runs tests and uploads test results to AgileTest.

YAML
# Sample step to upload Robot Framework test results to AgileTest
# Assuming you have a Robot Framework test suite that generates a report file to `./reports/robot-report.xml`
      - name: Upload report to AgileTest.App
        env:
          AGILETEST_CLIENT_ID: ${{ secrets.AGILETEST_CLIENT_ID }}
          AGILETEST_CLIENT_SECRET: ${{ secrets.AGILETEST_CLIENT_SECRET }}
        run: |
          docker run --rm \
          -e AGILETEST_CLIENT_ID=$AGILETEST_CLIENT_ID \
          -e AGILETEST_CLIENT_SECRET=$AGILETEST_CLIENT_SECRET \
          -v ${{ github.workspace }}/reports:/reports \
          ghcr.io/agiletestapp/agiletest-cli:latest \
          test-execution import --framework-type robot --project-key TC \
          /reports/robot-report.xml

Data Center Edition⚓︎

YAML
# Sample step to upload Robot Framework test results to AgileTest for Jira Data Center
# Assuming you have a Robot Framework test suite that generates a report file to `./reports/robot-report.xml`
      - name: Upload report to AgileTest on Data Center
        env:
          AGILETEST_DC_TOKEN: ${{ secrets.AGILETEST_DC_TOKEN }}
          AGILETEST_BASE_URL: ${{ secrets.AGILETEST_BASE_URL }}
        run: |
          docker run --rm \
          -e AGILETEST_DC_TOKEN=$AGILETEST_DC_TOKEN \
          -e AGILETEST_BASE_URL=$AGILETEST_BASE_URL \
          -v ${{ github.workspace }}/reports:/reports \
          ghcr.io/agiletestapp/agiletest-cli:latest \
          --data-center \
          test-execution import --framework-type robot --project-key TC \
          /reports/robot-report.xml

Bitbucket Pipelines⚓︎

Cloud Edition⚓︎

A working sample repo is available at agiletestapp/bitbucket-sample-automation-test-import. See bitbucket-pipelines.yml for a sample Bitbucket Pipelines configuration that runs tests and uploads test results to AgileTest.

YAML
# Sample step to test & upload Behave test results to AgileTest
      - step:
          image: python
          name: Behave Test & Upload Report
          script:
            - pip install -r requirements.txt
            - behave behave/features -f json -o reports/behave-report.json
            - |
              docker run --rm \
              -e AGILETEST_CLIENT_ID=$AGILETEST_CLIENT_ID \
              -e AGILETEST_CLIENT_SECRET=$AGILETEST_CLIENT_SECRET \
              -v $BITBUCKET_CLONE_DIR/sample-automation-test-import/reports:/reports \
              ghcr.io/agiletestapp/agiletest-cli:latest \
              test-execution import --framework-type behave --project-key TC \
              /reports/behave-report.json

Data Center Edition⚓︎

YAML
# Sample step to test & upload Behave test results to AgileTest for Jira Data Center
      - step:
          image: python
          name: Behave Test & Upload Report
          script:
            - pip install -r requirements.txt
            - behave behave/features -f json -o reports/behave-report.json
            - |
              docker run --rm \
              -e AGILETEST_DC_TOKEN=$AGILETEST_DC_TOKEN \
              -e AGILETEST_BASE_URL=$AGILETEST_BASE_URL \
              -v $BITBUCKET_CLONE_DIR/sample-automation-test-import/reports:/reports \
              ghcr.io/agiletestapp/agiletest-cli:latest \
              --data-center \
              test-execution import --framework-type behave --project-key TC \
              /reports/behave-report.json