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

Last updated: Oct 16, 2017 15:33

Table of Contents

Grouping tests by job & build in DigitalZoom Reporting

In order 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.

Bamboo Job Parameters

Bamboo provides some default variables such as job name, build number, plan name and more. 
For the complete list of Bamboo variables see here.
Bamboo variables can be used to provide to DigitalZoom Reporting the Job Name, Job Number parameters.
To access these variables use the following format within your code: 

${bamboo.variableName}

Instead of variableName use shortJobName and buildNumber to retrieve both and then pass them to Reporting Client.

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=${bamboo.shortJobName} -Dreportium-job-number=${bamboo.buildNumber} -Dreportium-job-branch=${myBranch} -Dreportium-tags=${myTag} 

The myTag and myBranch values should be supplied by you (see below, how to add variables), the bamboo.shortJobName and bamboo.buildNumber are supplied automatically by Bamboo.

To add CustomField pairs use the following format:

-DReportiumCustomFields=customField1=value1,customField2=value2

 

Additional Variables - tags 

Bamboo provides a way to inject variables and use them in your project using the Bamboo Inject Variables Plugin.
Add a new Inject Bamboo variables task and specify the path to the properties file from your source control (Git / svn).
The properties file should be in the following format:

tag1=tag1_value
tag2=tag2_value



1 Comment

  1. Additional details on where exactly you can find your  Maven or Ivy parameters.

    In your Build Dashboard list in Bamboo, find your project and click it.

    The page with plan summary will be opened.

    Then on upper right corner you have to click the gear icon and pick Plan Configuration.

    From the tabs in the middle of the page Click on the Stages Tab and from there click on your job listed under Default Stages.

    New page will be loaded. You have to pick Tasks Tab and from there, click on Maven. There you will see on the right part of the screen your Maven configurations. Your goals will be listed there. This is the place where you should put -Dreportium-job-name=${bamboo.shortJobName} -Dreportium-job-number=${bamboo.buildNumber}. Please keep in mind that if you don't change the Job Name Bamboo will give one by default. It si "Default Job" which is not helpful at all, so please name your job in a way, that will be easy understandable (for example -Dreportium-job-name=DesktopSmokeTest or DesktopFullRegressions). Imagine how hard would it be if you have 10 jobs named Default Job, Default Job 2 and so on, and you have 3 different teams using that Dashboard.

    Also keep in mind that if you use Quantum, there is no need to change or add anything in your code, this is done by default for Quantum environment. All you need to do is to configure your Bamboo Job