Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Oct 08, 2019 09:41

This section guides you through adding Perfecto Smart Reporting to TFS.

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.

On this page:

Add Job Name and Build Number parameters

Microsoft Team Foundation Server (TFS) provides some default variables. For the complete list of TFS variables, see here.
You can use TFS variables to provide the Job Name and Job Number parameters to Smart Reporting.
To access these variables, use the following format within your code: 

${variableName}

Instead of variableName, use BUILD_DEFINITIONNAME and BUILD_BUILDNUMBER to retrieve both and then pass them to the Reporting Client.

Supply Maven or Ivy parameters

If you are running your tests using Maven or Ivy, add the following JVM parameters and (optionally) the Report-tags parameter:

-Dreportium-job-name=${BUILD_DEFINITIONNAME} -Dreportium-job-number=${BUILD_BUILDNUMBER} -Dreportium-job-branch=${myBranch} -Dreportium-tags=${myTag}

You need to supply the myTag and myBranch values (see Add variables below). TFS automatically supplies the BUILD_DEFINITIONNAME and BUILD_BUILDNUMBER values.

To add CustomField pairs, use the following format:

-DReportiumCustomFields=customField1=value1,customField2=value2

Add variables 

TFS provides a way to inject variables and use them in your project using the User-defined variables tab within your build configuration.