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.
After installing this plugin , navigate to Global Configuration. Scroll down for Test Result Aggregator :
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".
1. Test Result Aggregator Plugin can be used as a "Free Style Project".
2. Select "Add Post Build" action and scroll to "Aggregate Test Results" action.
3. Add Groups/Teams and Jenkins Jobs
-
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 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
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
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
Ignore from report jobs with status NOT_FOUND, DISABLED or ABORTED.
1.Jobs and Tests graphs, see a sample :
2.HTML Report , sample :
-
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 :
See the Github releases page.
-
1.1.x Requires Jenkins < 2.277
-
1.2.x Requires Jenkins >= 2.277