Reputation: 35
I’m launching a spring boot application using the jacocoagent.jar
with these JVM arguments:
-javaagent:jacocoagent.jar=port=6300,address=*,destfile=jacoco-remote.exec,output=tcpserver
In the build.gradle
file I have the next config for jacoco plugin:
jacoco {
toolVersion = "0.8.5"
}
test {
jacoco {
enabled = true
}
}
e2eTest {
jacoco {
enabled = true
address = "localhost"
port = 6300
}
}
e2eTest.finalizedBy jacocoTestReport
When I launch test task for local unit tests coverage report, the test.exec is created in the build/jacoco directory with the html and xml report in the reports/jacoco directory.
But when I launch the e2eTest task through the remote agent the e2eTest.exec file is created in the build/jacoco directory, but not the html or xml report, in any directory.
Any of you know if I need other configuration or if I started the app with the corrects JMV arguments of the jacocoagent.
Thanks in advance!
Upvotes: 0
Views: 718
Reputation: 27994
Try running gradle with the --debug
option at command line. It should tell you a bit more about what's going on. It's probably SKIPPED because the default exec file doesn't exist (or maybe it's UP-TO-DATE)
It's possible/likely you'll need a JacocoReport
task for each test task. With each report task driven by its own exec
file
Upvotes: 1