HI Team,
I am trying to compute code coverage for a build hosted in tomcat. I am
following the below steps.
1. Added Java agent with Jacocoagent.jar in tomcat.conf file under
JAVA_OPTS
*javaagent:/opt/jacoco/lib/jacocoagent.jar=destfile=/opt/jacoco/Result/jacoco.exec,classdumpdir=/opt/jacoco/Result/classes,append=false,includes=**
2. Started Tomcat.
3. Ran tests.
4. After tests are complete stoped the tomcat in order to generate the
.exec file.
5. Keep class files which I wanted to instrument in one place along
with the exec file.
6. Now ran the report generation command
java -jar Path/jacococli.jar report Path/jacoco.exec --classfiles
Path/classes --html Path/Report --name jacocoReport --sourcefiles
Path/src/main/java
Now I am able to generate HTML report. *But not able to see the highlighted
source code*. But from the report I can see the functions under the classes.
For adding debugging info to the class I have added below code to maven's
pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<debug>true</debug>
<debuglevel>lines</debuglevel>
</configuration>
</plugin>
Can anyone please tell me what I am missing or what I am doing wrong.
Thanks in advance.
Regards,
Sabyasachi Mishra
--
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/9d440a15-f2d2-49c3-91b8-2af73b0d6700%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.