I instrumented the .jar files and put in WEB-INF/lib directory. The app ran fine. I shut down Tomcat to get data coverage collected but can't find the file anywhere. Does anybody have the same problem. Anyhelp is very appreciated.
I got this in the log when the app started.
EMMA: collecting runtime coverage data ...
Thanks,
Lance
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
EMMA dumps coverage data in an exit hook thread. Those are supposed to run when the JVM exits.
The message will show the absolute pathname of the coverage output file.
It is possible that EMMA did write the file but System.out output got lost by Tomcat. Have you customized EMMA output file location? If you set it to a known absolute pathname, you will eliminate the uncertainty of what user.dir is inside Tomcat.
See "I can't seem to find my coverage.ec file..." in the FAQ.
Some people find the exit hook mechanism too flaky and use a JSP or servlet to force data dumps before JVM exit. See "Is it possible to force a coverage data dump prior to JVM exit?" in the FAQ.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I instrumented the .jar files and put in WEB-INF/lib directory. The app ran fine. I shut down Tomcat to get data coverage collected but can't find the file anywhere. Does anybody have the same problem. Anyhelp is very appreciated.
I got this in the log when the app started.
EMMA: collecting runtime coverage data ...
Thanks,
Lance
Did you get anything from EMMA in the log when the app terminated?
No I did not. Should I expect to see something?
EMMA dumps coverage data in an exit hook thread. Those are supposed to run when the JVM exits.
The message will show the absolute pathname of the coverage output file.
It is possible that EMMA did write the file but System.out output got lost by Tomcat. Have you customized EMMA output file location? If you set it to a known absolute pathname, you will eliminate the uncertainty of what user.dir is inside Tomcat.
See "I can't seem to find my coverage.ec file..." in the FAQ.
Some people find the exit hook mechanism too flaky and use a JSP or servlet to force data dumps before JVM exit. See "Is it possible to force a coverage data dump prior to JVM exit?" in the FAQ.
Thanks much for the help