patternMinor
Aggregating JUnit test results from multiple projects
Viewed 0 times
projectsaggregatingjunittestmultipleresultsfrom
Problem
We have a Jenkins setup which utilizes multiple projects for running various suites of tests for our application.
There is one 'parent' project, which is triggered by Git commits. This project in turn builds our 'child' project. Each child projects runs a series of defined tests.
Each project is setup with JUnit to output onto the build page the results of the tests.
In order to get a comprehensive view of commits across our entire project, you need to go to the build page of EACH of our 'child' projects to see the results.
What I would like to do is aggregate ALL the JUnit reports, from builds triggered by out 'parent' project across all the 'child' projects to one place so we can view all the test results together.
Does anyone have experience with something like this?
There is one 'parent' project, which is triggered by Git commits. This project in turn builds our 'child' project. Each child projects runs a series of defined tests.
Each project is setup with JUnit to output onto the build page the results of the tests.
In order to get a comprehensive view of commits across our entire project, you need to go to the build page of EACH of our 'child' projects to see the results.
What I would like to do is aggregate ALL the JUnit reports, from builds triggered by out 'parent' project across all the 'child' projects to one place so we can view all the test results together.
Does anyone have experience with something like this?
Solution
The JUNIT plugin has a built-in publisher for aggregating test results called "Aggregate Downstream Test Results". You need to make sure that the 'parent' and 'child' jobs are linked together with a downstream/upstream relation. This is usually done by archiving an artifact in the parent build and copying it to the children builds using the 'Archive Artifact' publisher and the 'Copy Artifact' buildstep respectively.
Context
StackExchange DevOps Q#4534, answer score: 4
Revisions (0)
No revisions yet.