Search code examples
tomcatcode-coverageemma

Emma is not creating the coverage.ec file


Copied the emma.jar to $JAVA_HOME/lib/ext & instrumented it using the following command.

java -cp emma.jar emma instr -m overwrite -cp @jarlist.txt

jarlist.txt contains the list of jar files deployed by tomcat from the war file. And it got instrumented successfully & created the coverage.em

EMMA: processing instrumentation path ...

EMMA: instrumentation path processed in 5119 ms

EMMA: [4125 class(es) instrumented, 3142 resource(s) copied]

EMMA: metadata merged into [/root/install/apache-tomcat-7.0.19/webapps/coverage.em] {in 553 ms}

But even after restarting the tomcat multiple times coverage.ec file was not created. What I'm missing here?


Solution

  • When I copied the emma.jar inside the $CATALINA_HOME/webapps/myapplication/WEB-INF/lib & then instrumenting emma resolved this issue.