Skip to content
You're viewing the v2 docs. Looking for v1?Go to v1 docs
Docs
Testsigma
Popular questions
↑↓ to navigate↵ to selectesc to close
Book a demo

Azure DevOps

Azure DevOps triggers Testsigma test plans by running the shell script in a Bash@3 pipeline task. A PublishTestResults@2 task then publishes the JUnit report with the pipeline’s other results.

Prerequisites

  • An API key and the test plan ID (CI/CD Integrations tab of the plan).
  1. Copy the script: take the Unix shell script from the shell script page. On Windows, use the PowerShell script from the same page instead.

  2. Set the inputs: replace TESTSIGMA_API_KEY and TESTSIGMA_TEST_PLAN_ID in the script with your values.

  3. Commit it: save the script as cicd-api.sh in the code repository your pipeline will use.

  1. Create a project: sign in to your Azure DevOps account and create a Project.

  2. Start a pipeline: navigate to Pipelines and click New Pipeline.

  3. Pick the source: select the version control system, then the repository that contains cicd-api.sh and your configuration YAML file.

  4. Configure the YAML: on the Configure your pipeline page, select Existing Azure Pipelines YAML file and enter its branch and path. No YAML yet? Select Starter pipeline and Azure DevOps creates a sample file in your repository once you grant access.

  5. Review and edit: review the CI configuration and click Continue. Enter the path to cicd-api.sh in the filePath field:

    azure-pipelines.yml
    # Azure Pipelines YAML file
    trigger: master
    pool:
    vmImage: 'ubuntu-latest'
    steps:
    - script: echo Hello, world!
    displayName: Run a one-line script
    - task: Bash@3
    displayName: Run Shell Script (./cicd-api.sh)
    inputs:
    filePath: ./cicd-api.sh
    - task: PublishTestResults@2
    displayName: publish test-results
    inputs:
    testResultFormat: JUnit
    testResultsFiles: '**/*junit-report.xml'
  1. Run the job: click Run and track it on the pipeline results page. The job status shows Success when it completes.

  2. View the reports: navigate to Test Plans > Runs, then select the test plan whose report you want. Download the JUnit report in XML format from this page.

Was this page helpful?