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

Last updated: Oct 08, 2019 09:21

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

Add a link to your report from within Jenkins

You can add a dynamically generated link to the report for a given Jenkins job by using the Groovy Postbuild Plugin.

The script should include the following code:

jobName =
buildNumber =

summary = manager.createSummary("graph.gif")
summary.appendText("<a href=\"https://<CQL_NAME>[0]=${jobName}&jobNumber[0]=${buildNumber}\">Perfecto Test Report</a>", false)

See the details of the reporting server.

On this page:

Group tests by job and build in the Report Library

To view tests grouped by continuous integration system job and build in the Report Library, 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.

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=${JOB_NAME} -Dreportium-job-number=${BUILD_NUMBER} -Dreportium-job-branch=${GIT_BRANCH} -Dreportium-tags=${myTag}

You need to supply the myTag value. Jenkins automatically supplies the JOB_NAME, BUILD_NUMBER, and GIT_BRANCH.

To add CustomField pairs, use the following format:


This video shows how to add the Jenkins Job Name and Build Number parameters.

Set up Slack notifications

Using the Slack plugin for Jenkins, you can configure Jenkins to send you a notification when the tests complete and include the link to the report for easy access.

To do this:

  1. Go to the Post-build Actions section of the project configuration in Jenkins. 
  2. In the Slack Notifications sub-section, do the following:
    1. Find and select the Include Custom Message checkbox. 
      Note: You may need to click Advanced to access this field.
    2. In the Custom Message field, add the following:

      View your Perfecto report at: https://<CQL_NAME>[0]=${JOB_NAME}&jobNumber[0]=${BUILD_NUMBER}&tags[0]=${myTag}

        <CQL_NAME> is the prefix of your Perfecto CQ Lab. For example, if you access the Perfecto Lab at, then <CQL_NAME>=demo.

This video shows how to add Jenkins notifications for reporting to your Slack channel.