在 2015年4月1日星期三 UTC+8上午6:38:32,[email protected]写道:
> Hi,
>    I am having problem to generate a coverage report when running tomcat with 
> jacoco.
>   I have set up tomcat to run with the jacoco agent with this param: 
> -javaagent:/Users/leo_chan/dev/jacoco/lib/jacocoagent.jar=output=tcpserver,address=*,port=6300,dumponexit=false,append=false,..."
> 
> Then I used maven to kick of a testng test that hit a url which will in 
> return invoke my controller running in tomcat. Then maven task will dump the 
> exec file and generate the report.  I can see that exec file is generated and 
> but the final report snow 0 of 0 coverage.  On the sessions report page, it 
> does show my controller class in the "Execution data for the following 
> classes is considered in this report:" section.
> Class Id
> ....accessservice.controller.HeartbeatController      cac6fb3c4204f6d9
> 
> 
> But the main report only shows:
> Element       Missed Instructions     Cov.    Missed Branches Cov.
> Total 0 of 0  n/a     0 of 0  n/a
> 
> I check the target/classes folder and check the controller class is the same 
> one used in tomcat.  Why is the report shows 0 coverage?  What am I missing?
> 
> One thing is that the exec file doesn't seem to have a lot of information:
> ??MacBook-Pro.local-9822958fLqb?TLqcm???<B??=com/.../nsp/accessservice/controller/HeartbeatController??MacBook-Pro.local-224c5111Lqle?Lqlܙ???<B??=com/.../nsp/accessservice/controller/HeartbeatController??
> 
> Thanks for your help.
> 
> Leo

Did you shutdown your Tomcat at last step? 
http://stackoverflow.com/questions/6856744/getting-code-coverage-of-my-application-using-jacoco-java-agent-on-tomcat

-- 
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/68e43de6-bb45-4547-8b0d-07a3ad3a0237%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to