Hi,
you need to ensure that the Tomcat instance under test runs with the
JaCoCo agent. Documentation shows how to configure the agent:
http://www.jacoco.org/jacoco/trunk/doc/agent.html
Typically Tomcat comes with its own configuration files where you can do
this.
In case you want to dynamically configure the agent during your build
the jacoco:agent task simply helps you assemble the command line option.
After tomcat is properly terminated the agent writes a execution data
file (e.g. jacoco.exec). Using this file and the original class files a
report can be generated with the jacoco:report task.
The process and all Ant tasks are documented:
http://www.jacoco.org/jacoco/trunk/doc/ant.html
Regards,
-marc
On 2017-09-19 19:53, [email protected] wrote:
Hi
I am new to jacoco and i have tried jacoco on a core java application
with <jacoco:coverage> and it has worked fine. now i want to integrate
jacoco on a web application which runs on tomcat. i saw that we have
to add <jacoco:agent> for that below are my doubts
1. if we add <jacoco:agent> in build.xml is that sufficent ? or do i
have to make changes for java_OPTS in tomcat ?
2. i tried in the below way and it did not work am i missing something
?
a. added <jacoco:agent> in build.xml and made changes for
java_Opts in tomcat.
where do we get the result inde.html in this case.
do we have to do anything else other than this?
--
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/d76e51b1269559a9da9ea80b084dafb1%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.