Skip to content

Aggregate Test and Job results in a single HTML/email report

Notifications You must be signed in to change notification settings

sdrss/test-results-aggregator-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test Results Aggregator

Description

It’s a jenkins plugin that collects job and test results and reports them :

  • in a single html view,

  • email,

  • graphs

Test Results Aggregator can merge test results for :

and code coverage results for :

Jenkins Plugin https://github.com/jenkinsci/role-strategy-plugin/releases/latest Build Jenkins Plugin Installs

Important

It’s advisable to be used as the last step in a CI/CD pipeline. Currently supports only 'free style project' but can be integrated in a groovy pipeline script just by using a build action , for example :

stage("Aggregate Report") {
  build job: 'My_aggregate_results_job'
}

Requires both global and job configuration.

Global Configuration

After installing this plugin , navigate to Global Configuration. Scroll down for Test Result Aggregator :

Global Configuration

In this section you can define :

  • Jenkins Base Url : The HTTP address of the Jenkins installation, such as http://yourhost.yourdomain/jenkins/ This is used to access Jenkins API, so you can fetch results from any jenkins installation.

  • Jenkins Account Username : username of the account that will be used to access Jenkins API and fetch job results.

  • Jenkins Account password : password of the account that will be used to access Jenkins API and fetch job results.

  • Mail Notification From : sender for the mail Notification. Default is "Jenkins".

Job Configuration

1. Test Result Aggregator Plugin can be used as a "Free Style Project".

Free Style Project

2. Select "Add Post Build" action and scroll to "Aggregate Test Results" action.

Post Build Action

3. Add Groups/Teams and Jenkins Jobs

Jobs Configuraion
  • Group/Team : it’s optional, it’s used in report to group Jenkins jobs. For example teams , products or testing types.

  • Job Name : It’s mandatory, it’s the exact Jenkins job name to get results. In case of a job inside a 'folder' use : folderName/jobName or folderName(s)/jobName

  • Job Friendly Name : it’s optional, used only for reporting purposes, if null or empty then "Job Name" will be used in report.

4. Add Recipients List , Before,After Body text, theme and Sort by option

Recipients
  • Recipients List : comma separated recipients list, ex : [email protected],[email protected] . if empty no email will be triggered. Supports also job variables.

  • Subject prefix : prefix for mail subject. Supports also job & env variables.

  • Columns : html & email report columns and the order of them, comma separated. Possible columns are :

    • Health, Job, Status, Percentage, Total, Pass, Fail, Skip, Commits, LastRun, Duration, Description, Packages, Files, Classes, Methods, Lines, Conditions & Sonar

  • Before body : plain text or html code to add before report table. Supports also job & env variables , for example ${WORKSPACE} or ${myVariable}

  • After body : plain text or html code to add after report table. Supports also job & env variables.

  • Mail Theme : Ligth or dark mail theme.

  • Sort Results By : report will be sorted accordingly. If there are Groups then sorting refers to jobs inside a group.

5. Outdated results

OutofDate

Jobs with results more than X hours ago will be marked with 'red' color under 'Last Run' column report. Otherwise (if blank) column 'Last Run' will just have the timestamp of job completion.

6. Compare with previous run

CompareWithPrevious

Compare next run with the previous regarding job statuses, tests results and code coverage metrics. If false then no differences are displayed in report , no signs + -

7. Ignore Jobs from report by status

IgnoreJobs

Ignore from report jobs with status NOT_FOUND, DISABLED or ABORTED.

Reports

1.Jobs and Tests graphs, see a sample :

Main View

2.HTML Report , sample :

Html View
  • the html report is generated under workspace/html/index.html and can be published also via HTML Publisher Plugin

  • the same report is send via mail. You should configure in 'Global Configuration' the 'SMTP server' under 'E-mail Notification' configuration section.

3.Aggregated view , sample :

Aggregated

Release Notes

  • 1.1.x Requires Jenkins < 2.277

  • 1.2.x Requires Jenkins >= 2.277

About

Aggregate Test and Job results in a single HTML/email report

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 89.2%
  • Groovy 9.3%
  • Other 1.5%