Add reporting to Azure DevOps (VSTS)

You can integrate the Azure DevOps pipeline in a CI/CD process with Perfecto Smart Reporting to analyze test results using the CI Dashboard view.

Group tests by job and build in the Report Library

To view tests grouped by continuous integration system job and build, you need to provide the job name and build number into reporting as system variables. This enables you to group your test executions in reporting first by job name and then by build number, providing you a complete overview of the build quality.

Add Azure DevOps task parameters in a Job of Pipeline

Azure DevOps provides some default pre-defined variables, such as Build.DefinitionName, Release.ReleaseId, Build.SourceBranch and more. For the complete list of Azure DevOps predefined variables, see here.

You can use Azure DevOps predefined variables to provide the Job Name and Job Number parameters to the Smart Reporting feature.
To access these variables, use the following format within your code: 

Copy
${<phase>.<variableName>}

Instead of:

  • “<phase>”, you can use “Build” or “Release”, depending on which of Build/Release phase is in Pipeline.

  • variableName, use DefinitionNameReleaseId, and SourceBranch to retrieve all and then pass them to the Reporting Client.

Supply Maven or Ivy parameters

If you run your tests using Maven or Ivy, add the following JVM parameters and (optionally) the report-tags parameter, as follows:

Copy
-Dreportium-job-name=$(Build.DefinitionName) -Dreportium-job-number=$(Release.ReleaseId) -Dreportium-job-branch=$(Build.SourceBranch) -Dreportium-tags=${myTag}

You need to supply the myTag and AnyOther values (see Add variables below). Azure DevOps automatically supplies the Build.DefinitionName and Release.ReleaseId or Build.BuildId values.

To add CustomField pairs, use the following format:

Copy
-DReportiumCustomFields=customField1=value1,customField2=value2

Add variables - tags

Azure DevOps provides a way to add/update variables and use them in your pipeline with the Azure DevOps Pipeline Inject variables.

Copy
tag1=tag1_value
tag2=tag2_value