Jacoco Library to the tomcat libs

47 views
Skip to first unread message

omair....@gmail.com

unread,
Feb 25, 2015, 4:55:49 AM2/25/15
to jac...@googlegroups.com
I need to put Jacoco Library to the tomcat libs and add it as a part of its runtime as per per understanding i will need to add JVM opt to the tomcat startup scripts and use it as a proxy , is there any sufficient tutorial to do this please help as i am getting confused that how to add this and get the code coverage report

Marc Hoffmann

unread,
Feb 25, 2015, 7:52:07 AM2/25/15
to jac...@googlegroups.com
> I need to put Jacoco Library to the tomcat libs

Why? What do you want to archive?

regards,
-marc
Message has been deleted

omair....@gmail.com

unread,
Mar 5, 2015, 6:13:51 AM3/5/15
to jac...@googlegroups.com, omair....@gmail.com
I wanted to archive CODE Coverage report, i wanted jacoco agent to start upon tom cat starts and close and tom cat close but by the end i wanted code coverage report, any how i menage to get the code coverage report by adding following command into tomcat catlina:

if "%1"=="stop" goto skip_agent
set JAVA_OPTS=%JAVA_OPTS% -javaagent:"C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\lib\jacocoagent.jar=destfile=C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\lib\jacoco.exec,append=true,includes=com.softech.*"
:skip_agent


now i read the jacoco.exec file by importing it into eclipse with Ecllma plugin.


please suggest if there is any other better way to read the report

Marc R. Hoffmann

unread,
Mar 5, 2015, 3:55:59 PM3/5/15
to jac...@googlegroups.com
> please suggest if there is any other better way to read the report

JaCoCo offers several ways to create a coverage report:

1) Ant
2) Maven
3) Eclipse
4) Java APIs

In any case please make sure that the class files used for report
generation are the same class files than the ones used at runtime.

A good entry point is the documentation:
http://www.eclemma.org/jacoco/trunk/doc/

Regards,
-marc
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages