I am having my web application running on tomcat , and in separate project i have my test cases which calls all apis of my app , now i want to check code coverage , covered during api calls from automated test suit.
Steps I followed:
- jacoco dependency in pom.xml of my web app.
- downloaded jacocoagent.jar
- set JAVA_OPTS in catalina.sh export JAVA_OPTS="$JAVA_OPTS - javaagent:/tmp/jars/jacocoagent.jar=destfile=/tmp/jars/jacoco.exec,output=file"
- after all apis killing tomcat
- copying jacoco.exec file
- creating html report
but still getting zero coverage , have i missed any thing please suggest