In my gradle build I have 2 test tasks like this:
task testAAA(type: Test) {
filter {
includeTestsMatching "*AAA*"
}
finalizedBy jacocoTestReport
}
and
task testBBB(type: Test) {
filter {
includeTestsMatching "*BBB*"
}
finalizedBy jacocoTestReport
}
This generates 2 .exec files in build/jacoco:
testAAA.exec
testBBB.exec
I want to generate a single coverage report that takes input from BOTH/ALL of the .exec files, I tried this:
jacocoTestReport {
executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
reports {
xml.enabled true
}
}
When I try that I get this error:
Execution failed for task ':Project1:jacocoTestReport'.
> Unable to read execution data file Project1/build/jacoco/test.exec
Project1/build/jacoco/test.exec (No such file or directory)
Why is jacocoTestReport looking for "test.exec" when I explicitly provided an executionData specification?