I have seen similar questions and tried enough yet can't get this to work. I have testset in my build.gradle file and trying to configure Jacoco test report to include my separate integrationTest
build.gradle
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
counter = 'LINE'
value = 'COVEREDRATIO'
minimum = 0.5
}
}
}
}
jacocoTestReport {
// Gather execution data from all subprojects
executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
sourceSets sourceSets.main
reports {
html.enabled true
}
}
test.finalizedBy jacocoTestReport // report is always generated after tests run
jacocoTestReport.dependsOn test, integrationTest // tests are required to run before generating the report
check.dependsOn integrationTest, jacocoTestCoverageVerification