-javaagent:./lib/jacocoagent.jar=output=tcpserver,address=127.0.0.1,port=2710,includes=./target/classes/com/p/cd-poc -Dconfig=./etc/config.properties -Dlog.levels-file=./etc/log.properties
- Next I brought up the service locally and hit an endpoint and generated a report using the jacococli.jar using the following commands:
java -jar lib/jacococli.jar dump --destfile jdump.exec --address 127.0.0.1 --port 2710
java -jar lib/jacococli.jar report jdump.exec --classfiles cd-poc-1.0-SNAPSHOT.jar --xml j.xml
The generated j.xml has 0 coverage for all the methods.
I observed this behaviour even when the endpoint was hit using an integration test case.
A little background about the code. The code is a JAVA service and the integration tests are written in Ruby.
Am I missing something here?
The following steps does not generate any coverage for code that is covered by tests.- I added the javaagent to the VM config of my service like this:-javaagent:./lib/jacocoagent.jar=output=tcpserver,address=127.0.0.1,port=2710,includes=./target/classes/com/p/cd-poc -Dconfig=./etc/config.properties -Dlog.levels-file=./etc/log.properties