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

Azure DevOps

Integrating Azure DevOps with Arcus by Testsigma uploads your JUnit test results to a test run at the end of a pipeline run, so test case statuses update automatically.

Prerequisites

  • An Azure DevOps account.
  • A project in Arcus by Testsigma with at least one test run.
  • An Arcus by Testsigma API token.

The pipeline reads the token from a pipeline variable named TESTSIGMA_API_TOKEN, so add it in Azure DevOps and mark it as a secret.

  1. In Azure DevOps, open your pipeline.

  2. Click Edit in the top right.

  3. Replace the contents of azure-pipelines.yml with the following, then replace the 2 placeholders as described below.

trigger:
- master
pool:
vmImage: ubuntu-latest
variables:
TESTSIGMA_API_TOKEN: $(TESTSIGMA_API_TOKEN)
steps:
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'package'
continueOnError: true
displayName: 'Build and test with Maven'
- bash: |
curl --location 'https://arcus.testsigma.com/api/v1/projects/<Project_ID>/junit-import/test-run/<Run_ID>' \
--header "Authorization: Bearer $TESTSIGMA_API_TOKEN" \
--form "junit_xml=@target/report.xml"
env:
TESTSIGMA_API_TOKEN: $(TESTSIGMA_API_TOKEN)
displayName: 'Upload test results to Testsigma'
  • Replace <Project_ID> with your project ID, which you can retrieve using the Arcus by Testsigma APIs.
  • Replace <Run_ID> with the run ID, which appears in the URL when you view a test run: https://test-management.testsigma.com/ui/test_runs/<Run_ID>/.
  • Point junit_xml at the path your build writes its JUnit XML report to. For a Maven build this is under surefire-reports.
  • Change master under trigger if your target branch is named something else.

In your Azure DevOps pipeline, click Run pipeline.

When the build finishes, the test run in Arcus by Testsigma updates with the execution results.

Was this page helpful?