I have a web application deployed to Tomcat. Before I get more information, let me outline the versions.
Versions: jdk 1.7, Tomcat - 7.0.19, jacoco -0.5.6
I added jdk1.7 to Tomcat. In the file \ apache-tomcat-7.0.19 \ bin \ startup.bat I added.
SET JAVA_HOME=C:\ProgramFiles\Java\jdk1.7.0
I also added a jacoco agent for Tomcat. In apache-tomcat-7.0.19 \ bin \ catalina.bat I added.
SET JACOCO=-javaagent:<my download folder>\jacoco-0.5.6.201201232323\lib\jacocoagent.jar=destfile=C:\jacoco.exec,append=true,includes=*
set JAVA_OPTS=%JAVA_OPTS% %JACOCO%
Now when I start Tomcat and hit my web applications, as expected, there is a C: \ jacoco.exec file.
Now I moved the code to the following directory structure jacoco.exec / bin / / coveragereport
Now I used the ReportGenerator class from http://www.eclemma.org/jacoco/trunk/doc/examples/java/ReportGenerator.java . I have a bunch of HTML reports in the / coveragereport directory. However, all code is displayed as unaffected. Although after I fired Tomcat, I went to http: // localhost : / and looked. I was hoping to get a coverage report.
I am missing something very elementary. Please help me.
source
share