How to get JaCoCo instrumentation code coverage while executing webApplication on server

134 views
Skip to first unread message

rajeshb...@gmail.com

unread,
Feb 9, 2017, 5:05:33 AM2/9/17
to JaCoCo and EclEmma Users

up vote
0
down vote
favorite

I want to get a code coverage report (or tracking controller flow of an application) when I execute the some scenario on live application i.e. while application running in server, so I have refereed the official Jacoco documentation and did as fallows

As a first step, I tried to bind the jacoco agent to the application running port

export MAVEN_OPTS=-javaagent:/home/user/.m2/repository/org/jacoco/org.jacoco.agent/0.7.4.201502262128/org.jacoco.agent-0.7.4.201502262128-runtime.jar=includes=*,output=tcpserver,port=6300,address=*,dumponexit=true

then I have started the server and executed some test scenarios by that time I have also requested jacoco to get the dump by executing following command

mvn jacoco:dump

when I executed the above command first it showed like java.net.BindException: Address already in use then it printed as fallows

[INFO] Connecting to localhost/127.0.0.1:6300

When I stopped the server jacoco.exec has been generated to a known location there after I have requested to generate a jacoco report by executing the following command

mvn jacoco:report

Finally I got the report but when I open the index.html page it showed 0% coverage.

Please help me to get the code coverage report and any help will be appreciated.

Evgeny Mandrikov

unread,
Feb 9, 2017, 5:53:38 AM2/9/17
to JaCoCo and EclEmma Users, rajeshb...@gmail.com
Answered in place, where question was posted initially - http://stackoverflow.com/a/42134740/244993

rajeshb...@gmail.com

unread,
Feb 14, 2017, 2:46:55 AM2/14/17
to JaCoCo and EclEmma Users, rajeshb...@gmail.com

Mandrikov as you sujested I have edited my post in stackoverflow please have a look

rajeshb...@gmail.com

unread,
Feb 14, 2017, 2:47:32 AM2/14/17
to JaCoCo and EclEmma Users, rajeshb...@gmail.com

rajeshb...@gmail.com

unread,
Feb 14, 2017, 2:47:50 AM2/14/17
to JaCoCo and EclEmma Users, rajeshb...@gmail.com
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages