In absence of specification of JaCoCo version - first of all please make 
sure that you use latest released version that is 0.7.9 as of today.

You showed only part that is related to agent, but nothing about generation 
of report, so:

Given that you use "output=tcpserver" which is according to documentation 
at http://www.jacoco.org/jacoco/trunk/doc/agent.html

tcpserver: The agent listens for incoming connections on the TCP port 
specified by the address and port attribute. Execution data is written to 
this TCP connection.

make sure that you do actually connect and dump execution data. And that 
you do this after actual execution of tests and not before.

Make sure that dump is not empty, has significant size.

During generation of report make sure that you actually use the dump 
obtained on previous step and not some other.

Make sure that there is no warnings during generation of report. In 
particular make sure that report is generated using exact same class files 
that are deployed into your tomcat. At 
http://www.jacoco.org/jacoco/trunk/doc/classids.html you can read more 
about why this is important and how to detect such problem:

How can I detect that I have a problem with class ids?

The typical symptom of class id mismatch is classes not shown as covered 
although they have been executed during the test. This situation can be 
easily detected e.g. in the HTML report: Open the Sessions page with the 
link on the top-right corner. You see a list of all classes where execution 
data has been collected for. Find the class in questions and check whether 
the entry has a link to the corresponding coverage report page. If the 
entry is not linked this means there is a class id mismatch between the 
class used at runtime and the class provided to create the report.


Regards,
Evgeny

On Monday, December 4, 2017 at 5:39:07 AM UTC+1, Shiny Sudar wrote:
>
> Hello,
>
> Following is the arguments which I add to Java arguments of tomcat : 
> -javaagent:<path of jacoco 
> folder>/lib/jacocoagent.jar=append=true,output=tcpserver,address=localhost,port=36320,includes=*
>
> Im using jacoco as above. Previously it was working fine with tomcat 7  
> and java 8 and I was getting code coverage information.
>
> But now I had to upgrade to tomcat  8.0.26.08 and Java  1.8.0_131-b11. Now 
> I'm always getting zero coverage. Can anyone help pls?
>
> Is there any log or something which I use for troubleshooting
>
> Thanks,
>
> Angel
>
>
>

-- 
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/836752d2-f44e-4f08-9b7d-1b787a08fb9b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to