unbroken-dome / gradle-testsets-plugin

A plugin for the Gradle build system that allows specifying test sets (like integration or acceptance tests).
MIT License
230 stars 50 forks source link

Question: Can you have separate and merged jacoco reports #124

Closed ameti closed 3 years ago

ameti commented 3 years ago

I added an integration testset and I also am using the jacoco plugin. I can see the separate reports but couldn't figure out how to add also a merged jacoco report for them. I can either make them separate or only merged. Is such thing possible?

ameti commented 3 years ago

Solved it with

task combineJaCoCoReports(type: JacocoReport) {
    executionData fileTree(project.buildDir.absolutePath).include("jacoco/*.exec")
    classDirectories.setFrom files(project.sourceSets.main.output)
    sourceDirectories.setFrom files(project.sourceSets.main.allSource.srcDirs)

    reports {
        html.enabled(true)
    }
}