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

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 will enable 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

TeamCity provides some default variables. For the complete list of TeamCity variables, see here.
You can use TeamCity 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 teamcity.buildConfName and build.number to retrieve both 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:

-Dreportium-job-name=${teamcity.buildConfName} -Dreportium-job-number=${build.number} -Dreportium-job-branch=${myBranch} -Dreportium-tags=${myTag}

You need to supply the myTag and myBranch values (see Add variables below). TeamCity automatically provides the teamcity.buildConfName and build.number values.

To add CustomField pairs, use the following format:

-DReportiumCustomFields=customField1=value1,customField2=value2


Add  variables 

TeamCity provides a way to inject variables and use them in your project using the Parameters settings within your build configuration.