Quantcast
Channel: Gradle Forums - Latest posts
Viewing all articles
Browse latest Browse all 19859

Generating aggregate `TestReport` even on failure

$
0
0

I know this post is very old but I ran into a similar issue today and was able to get aggregate reports with --continue using task finalizers:

    tasks.create('testReport', TestReport) {
        destinationDir = file("${buildDir}/reports/allTests")
    }
    // this ensures the allTests report is generated without creating a dependency on
    // the test tasks which allows the aggregated test reports to be generated even when
    // there are test failures when running with the --continue flag
    tasks.withType(Test).all { Test testTask ->
        tasks.testReport.reportOn testTask.binaryResultsDirectory.locationOnly
        testTask.finalizedBy tasks.testReport
    }

You would need to adjust it for dealing with your subprojects, but I think it should work.


Viewing all articles
Browse latest Browse all 19859

Trending Articles