[workflow-plugin] aggregate several junit results

42 views
Skip to first unread message

sebastien....@gmail.com

unread,
Feb 16, 2015, 8:51:39 AM2/16/15
to jenkins...@googlegroups.com
Hello,

I'm trying to replace several jobs with a single  workflow job.

One of the jobs was a matrix one which built and run tests under several configuration (namely debug and release builds).

The groovy script below replaces it, but the test results from the two configurations are mixed in the junitResult.xml. All the test results are in the file, but their origin is lost.

On the contrary, the matrix job kept one junitResult.xml file per (configuration-specific) sub-job so the information was not lost.

How could I get this feature back in my workflow job?
Maybe a solution would be to let JUnitResultArchiver take a "destination" argument?

String[] release_types = ['debug', 'release']
for (int i = 0; i < release_types.size(); ++i) {
  String release_type = release_types[i]
  node("qibuild-linux64") {
    echo "release_type: ${release_type}"
    env.release_type = release_type
    sh "build.py"
    step([$class: 'JUnitResultArchiver', testResults: 'tests/*/*.xml'])
  }
}

cheers,
Sébastien

Jesse Glick

unread,
Feb 26, 2015, 11:47:40 AM2/26/15
to jenkins...@googlegroups.com
On Monday, February 16, 2015 at 8:51:39 AM UTC-5, sebastien....@gmail.com wrote:
the test results from the two configurations are mixed in the junitResult.xml. All the test results are in the file, but their origin is lost.

How could I get this feature back in my workflow job?

 TBD. Workflow cannot yet really replace matrix projects. CloudBees is considering such a feature in RM-2811 [1], possibly as an Enterprise extension; certainly it would need to include some way of discriminating test results (and other sorts of reports) by a flow-defined identifier akin to matrix combination.


Reply all
Reply to author
Forward
0 new messages