0

Am exploring Jacoco code coverage for my project.After going through various article this is what i did.

Setup Tomcat - 6.0.35 jacoco javaagent- 0.6.4

Added these parameter at the start of catalina.sh

CATALINA_OPTS="-javaagent:/Users/jgupta/Documents/Exported_Software/apache-tomcat-6.0.35/lib/jacocoagent.jar=output=tcpserver,address=*,port=6300,destfile=/Users/jgupta/Documents/Exported_Software/apache-tomcat-6.0.35/jacoco-report/jacoco.exec"

1) Started tomcat. 2) Browse through the site. 3) Stopped tomcat.

No file is created in jacoco-report. Not even jacoco.exec. Directory is empty.

Please help me out here. There has to something which am missing.

1 Answers1

1

You set

output=tcpserver

so that means no report will be saved after tomcat stops. To get such report you need to use ant task. More info here

To get file saved on your filesystem use output=file or simply delete this parameter since this is by default.

Community
  • 1
  • 1
ZuzEL
  • 12,768
  • 8
  • 47
  • 68