Hi,
I have a project that contains test classes written with different testing frameworks (JUnit, TestNG, Spock). What’s the best way of aggregating the test reports generated by each individual test task into one using Gradle 1.4? Currently, I am using the internal API class DefaultTestReport but was wondering if there is a way to do this with a class of the public API. This is how the relevant parts of my build script look like:
import org.gradle.api.internal.tasks.testing.junit.report.DefaultTestReport
import org.gradle.api.internal.tasks.testing.junit.result.AggregateTestResultsProvider
task testNG(type: Test) {
useTestNG()
}
test.dependsOn testNG
test {
doLast {
def reporter = new DefaultTestReport()
def binTestDirs = files(test.binResultsDir, testNG.binResultsDir)
reporter.generateReport(new AggregateTestResultsProvider(binTestDirs), test.testReportDir)
}
}