Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins MultiJob Plugin does not aggregate downstream test results

I am using the jenkins multijob plugin to execute a number of parallel builds in the same build phase and i want to display the test results in the main multijob project so i select a post-build action step to 'Aggregate down stream test results' and select both options 'Automatically aggregate all downstream tests' and 'Include failed builds in results' but when the jobs complete and i go into the main multijob project it shows 'no tests' under 'Latest Test Result' link...

Has anyone else encountered this issue? My downstream 'child' projects that run in parallel are multi-configuration projects.

like image 334
Wez Avatar asked Apr 08 '14 23:04

Wez


1 Answers

As a previous poster indicated, this is an open issue in the Jenkins JIRA and does not work. There is a workaround to achieve what your looking for. Your going to need the Copy Artifact Plugin and to also Archive the test result files as Artifacts in your jobs that are doing the test runs.

After you have installed this and configured your test run jobs properly, go to your Multijob and after all your test phases add a build step "Copy artifacts from another project" for each of the jobs you want the test results from. You can use "Specified by permalink" and use the "Last build" permalink to always retrieve the latest artifacts. Select the artifacts you want to copy (i.e. *.xml), and input your target directory as something like "job1". If you add multiple build steps to copy artifacts from another project, just name your target directories for the copied artifacts something similar like "job2", "job3", etc.

Then select a Post-build action in your Multijob as you would to Publish JUnit test result report (or whatever you prefer) and input **/job*/*.xml (or similar).

This is what I did, and it works just fine. It is a bit manual in the setup, but it works great once its configured.

like image 86
rsennewald Avatar answered Nov 14 '22 12:11

rsennewald