Unable to get coverage data when jacoco configured with jetty server

90 views
Skip to first unread message

Harish Gautham

unread,
Mar 13, 2018, 2:32:26 AM3/13/18
to JaCoCo and EclEmma Users
Hi
 
    Am trying to get  jacoco code coverage for application running on jetty server[Docker Image]

 We have docker container for our application and we pull the image of that application [running using jetty server] ..
Am trying to get the code coverage configured for our application.. however i see the jacoco.exec getting generated with no data in it...

this is how i start the jetty server  with the jacocoagent mentioned in the start command....

/usr/bin/java -server -Xmx256m -javaagent:/opt/jacocoagent.jar=destfile=/opt/jacoco.exec -Djava.security.debug=off -Dipsao.security.jps.config=/opt/ml/config/wallets/sim_jps-config-jse.xml -Dipsao.ml.config=/opt/ml/config/local-harve.config -Dipsao.pid.config=/opt/ml/config/local-harvester.config -DtemplateRecFile=/opt/ml/config/template_re.txt -Djava.util.logging.config.class=ipsao.core.ojdl.logging.LoggingConfiguration -Dipsao.core.ojdl.logging.config.file=log/harve-logging.config -classpath /opt/ml/services/catalog-jetty/lib/Data-jetty-0.1.0-SNAPSHOT-jar-with-dep.jar ipsao.dc.jetty.DCJetty -daemon

i notice that a empty jacoco.exec is getting generated and i do not see any coverage on stoping the server after running some tests...


Thanks
Gautham

Evgeny Mandrikov

unread,
Mar 13, 2018, 6:31:52 AM3/13/18
to JaCoCo and EclEmma Users
Hi,

JaCoCo creates an empty file at startup to ensure that location is writable.
So please make sure that you gracefully terminate JVM.

Harish Gautham

unread,
Mar 13, 2018, 1:58:29 PM3/13/18
to JaCoCo and EclEmma Users
Hi,

   Thanks a lot .. so i did a graceful terminate of the JVM and got to see the code coverage..

Thanks
Harish
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages