CI/CD
Azure DevOps Integration with Test Management by Testsigma
Integrate Azure DevOps with Test Management by Testsigma and automate your test runs and generate test reports.
Integrate Azure DevOps with Test Management by Testsigma to automate test executions and generate test reports through CI/CD pipelines. This article discusses integrating Azure DevOps with Test Management by Testsigma.
Prerequisites
Before you begin, ensure:
- You have a Project in Test Management by Testsigma and Test Runs are available.
- You have an API token from Test Management by Testsigma.
- You have an Azure DevOps account.
Configuring azure-pipelines.yml File
Section titled “Configuring azure-pipelines.yml File”-
In Azure DevOps, open your pipeline.
-
Click Edit in the top-right corner.
-
Replace the contents of the
azure-pipelines.ymlfile with the following YAML:trigger:- masterpool:vmImage: ubuntu-latestvariables:TESTSIGMA_API_TOKEN: $(TESTSIGMA_API_TOKEN)steps:# 🔧 Step 1: Build Using Maven and Generate Test Report- task: Maven@3inputs:mavenPomFile: 'pom.xml'mavenOptions: '-Xmx3072m'javaHomeOption: 'JDKVersion'jdkVersionOption: '1.8'jdkArchitectureOption: 'x64'publishJUnitResults: truetestResultsFiles: '**/surefire-reports/TEST-*.xml'goals: 'package'continueOnError: truedisplayName: '🔨 Build and Test with Maven'# 📤 Step 2: Upload JUnit Result to Testsigma Using CURL- bash: |echo "Uploading JUnit results to Testsigma..."curl --location 'https://test-management.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'
Trigger a Build in Azure DevOps
Section titled “Trigger a Build in Azure DevOps”-
In your Azure DevOps pipeline, click Run pipeline.
-
After the build completes, the test run in Test Management by Testsigma is automatically updated with the test execution results.