Hi,

      So, requirement is to get integration test coverage of remote web service 
in local client. Problem is I don't have access to source and classes of web 
service. Following are the things I have accomplished till now.

1. Created standalone application(local client) consisting test cases, which 
are hitting web service APIs for test purpose. I update its maven configuration 
to add jacoco maven plugin and failsafe plugin. Assigned path for jacoco.exec 
and data directory.

2. I followed, tcpserver approach. Modified catalina.sh file of tomcat which is 
hosting web service. Inserted following line
export CATALINA_OPTS="$CATALINA_OPTS 
-javaagent:jacocoagent.jar=output=tcpserver,address=xyz,port=xyz,classdumpdir=temp,dumponexit=false,includes=xyz*"

3. And after this change, at client side application, I added 'dump' goal to 
receive test execution dump from server. Thats all.

Everything is working fine at client side as well as server side. Execution 
dump is getting transferred from server to client, which I can see in Jacoco 
report at client app.

But I'm only getting list of classes(names) of web services in session of 
report. As, I don't have access to remote classes. Report is unable to link 
classes to its sources.

Also, at server side, due to tcpserver output type, jacoco.exec is not getting 
created. Also no report in html form found at server side.

I'm new to testing domain. And all above things I have achieved in last 2 days. 
Considering my requirement, I might have opted wrong approach.

So, it will be helpful, if somebody corrects me and guide me for right approach 
towards the requirement. Also, in coming future I want to integrate this report 
in SONAR as well.

Thanks for help and patience. :-) 


On Thursday, 30 July 2015 07:29:06 UTC-7, Marc R. Hoffmann  wrote:
> Hi,
> 
> how do you create the coverage report? It is important to use the exact 
> same class files which are deployed to your remote web server. Please 
> find a detailled discussion in documentation:
> 
> http://www.eclemma.org/jacoco/trunk/doc/classids.html
> 
> Regards,
> -marc
> 
> On 2015-07-29 00:30, [email protected] wrote:
> > I am trying to measure code coverage of remote web service. Using dump
> > goal, I'm getting execution dump from server to client(i.e.
> > application triggering test cases) . Also report is getting displayed.
> > 
> > The report shows zero test coverage and in session tab I'm getting
> > list of classes from remote web service. So, classes being tested are
> > enlisted in report.
> > 
> > As, I am new to JACOCO, I have few basic questions to ask.
> > 
> > 1. Logically its impossible to get source attached to remote classes
> > enlisted in session. But still, is there such provision?
> > 
> > 2. Why I'm getting zero test coverage? jacoco.exec seems fine at
> > server end. I read few posts earlier, as I was facing issue of linking
> > source to class and at that time too I was getting zero test coverage.
> > Is this a similar issue.
> > 
> > Please guide me to resolve these issue. If anyone want more
> > explanation, plz let me know. Thanks in advance :-)

-- 
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/7d86dde4-aeb5-4798-b3ff-51875595e1bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to