Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Merge unit test reports from multi projects Gradle build

Tags:

gradle

testing

I have a multi module Gradle script with 3 modules: common, services and web.

If I run gradle check all the test suite is performed correctly, but I don't have a single test report instead I found a test report for each subproject. How can I merge the test results?

If useful this is the script I'm using https://github.com/CarloMicieli/trenako/blob/master/build.gradle

Thanks Carlo

like image 844
Carlo Micieli Avatar asked Jul 08 '12 08:07

Carlo Micieli


1 Answers

The Gradle source contains a Task class used to accomplish this, which unfortunately isn't available in the public API. Basically all it does is copy all of the test reports from various projects into one directory and then run the standard test report task to get an aggregate. Check out the source code at https://github.com/gradle/gradle/blob/master/buildSrc/src/main/groovy/org/gradle/build/TestReportAggregator.groovy

like image 99
TheKaptain Avatar answered Oct 23 '22 23:10

TheKaptain