Jacoco file not growing

84 views
Skip to first unread message

mahes...@gmail.com

unread,
Mar 24, 2017, 1:02:50 PM3/24/17
to JaCoCo and EclEmma Users
Hi All,

Goal: Collect the codecoverage for selenium webdriver functional tests.

Myself configured jacoco-0.7.4.201502262128.zip with tomee-plus 1.72.

Data file is not growing when i stopped the service. Let me am i missing anything here.

1. Copied jacocoagent.jar file to tomee/lib folder
2. Started with following javaoptions
-javaagent:<path>\jacocoagent.jar=destfile=<path>\jacocoST.exec,append=false
3. run some selenium webdriver test cases or manual tests.
4. Stopping the service.

Still my jacocoST.exec file says 0KB. Can someone confirm am i missing anything here?

Regards,
Mahesh K

linki...@gmail.com

unread,
Aug 31, 2017, 12:15:33 AM8/31/17
to JaCoCo and EclEmma Users, mahes...@gmail.com

did you get splution of this problem ? i am also facing same issue ...

Evgeny Mandrikov

unread,
Sep 4, 2017, 5:30:12 PM9/4/17
to JaCoCo and EclEmma Users, mahes...@gmail.com, linki...@gmail.com
First of all our recommendation is to always use latest released version, which is as of today 0.7.9 and not 0.7.4.

Secondly as was described in this mailing list many times: JaCoCo always creates empty dump file at startup to guarantee that location is writable. Then it registers standard JVM Shutdown hook ( see http://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html#addShutdownHook(java.lang.Thread) ) that will write all collected information, but whose execution not guaranteed if JVM was not gracefully terminated. So the thing to check - is that application under test is terminated gracefully and not just killed.

Also be aware that there is JVM bug ( https://bugs.openjdk.java.net/browse/JDK-8154017 ) - when the main thread is in the interrupted state the JVM shutdown hooks are not properly executed. So also please make sure that main thread of application is not left in interrupted state.


HTH.
Reply all
Reply to author
Forward
Message has been deleted
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages