Hi,
by default the JaCoCo agent sends execution data at JVM shutdown only. A
proper shutdown sequence is required. If you e.g. simply kill the JVM it
has no chance to send execution data.
What is the exact content of the "nearly blank" exec file? You can
explore e.g. with the execinfo command from our command line tools:
https://www.jacoco.org/jacoco/trunk/doc/cli.html
Requesting exec data with RemoteControlWriter.visitDumpCommand(true,
false) should actually work. E.g. our integration with Eclipse works in
this mode.
Regards,
-marc
On 2018-04-26 22:51, [email protected] wrote:
I am trying to set up jacocoagent in client mode, but having trouble
making it send back the report data to the server. I am using the
example ExecutionDataServer provided in the documentation here:
https://www.jacoco.org/jacoco/trunk/doc/examples/java/ExecutionDataServer.java
I can see a Handler getting created once I start the service from
which I am trying to get coverage data, so I believe the jacocoagent
is connecting. But after the service finishes running, the jacoco.exec
file is nearly blank. I have also tried to modify the server code to
send a request to dump data, using
RemoteControlWriter.visitDumpCommand(true, false) after a delay; that
did not work either. I have gotten a successful coverage report using
tcpserver mode, but I would prefer to get the client mode to work
since eventually I need to get report data from multiple
micro-services. I am using maven, and currently running everything
locally but eventually plan to move it to a docker cluster.
--
You received this message because you are subscribed to the Google Groups "JaCoCo
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jacoco/766ff269f2ae51174d01a5cea49b564e%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.