Jacoco remote jacocoagent in a Spring Boot not generate report

Hi!

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 :slight_smile:

1 Like