Hi Glenn,

files are written in the following sequence:

1) At startup a empty jacoco.exec file is writen to ensure that the specified location is writable
2) Classes are dumped whenever a class is loaded
3) Execution data is written out in the JVM's shutdown hook, which requires proper termination

This explains while files in 1) and 2) are writtem even if the JVM is not properly terminated.

Regards,
-marc

On 24.08.15 18:22, Glenn Caccia wrote:
Hey all,

I'm trying to get code coverage for a tomcat app. I've used jacoco before for tomcat apps and have been successful in getting reports. My process is to attach the jacoco agent to the tomcat process, run my tests, shut down tomcat, and then generate a report using a maven project with the jacoco.exec and src files as the source material (see below for agent config). With this latest tomcat app, however, after shutting down the tomcat app, jacoco.exec has a size of 0. Despite this, it is creating class dump files, which would seem to suggest that it is recognizing the execution of code. Does that make any sense? Any ideas on what would cause jacoco.exec to be empty despite the creation of class dump files? One thing that is different about this tomcat app compared to others is that it is a multi-module project. Would that cause problems in this context? If yes, any suggestions on how to work around the problem?

Thanks,

Glenn

-javaagent:${CATALINA_BASE}/webapps/tomcatAppName/WEB-INF/lib/jacocoagent.jar=output=file,destfile=${CATALINA_BASE}/logs/jacoco.exec,dumponexit=true,includes=com.mycompany.rss.mme.*,classdumpdir=${CATALINA_BASE}/logs/classes,append=false
--
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] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/597ca800-251f-4e87-899e-0f94798181e5%40googlegroups.com <https://groups.google.com/d/msgid/jacoco/597ca800-251f-4e87-899e-0f94798181e5%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
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/55DBF50A.3040401%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to