.exec file not generated. Using Wildfly 10.1.0, org.jacoco.agent-0.7.4.201502262128-runtime.jar

306 views
Skip to first unread message

ashr...@gmail.com

unread,
Oct 11, 2017, 3:32:02 AM10/11/17
to JaCoCo and EclEmma Users
Hello All,

I am new to Jacoco.
I am doing the following, but the .exec file is not getting generated.
Please advice me on what could be wrong in our setup.


Steps i am performing:

1. downloaded the org.jacoco.agent-0.7.4.201502262128-runtime.jar in the folder /home/ashraf/jacoco/

2. added the following line in "standalone.conf" file under <Wildflyhome>/bin


JAVA_OPTS="$JAVA_OPTS -javaagent:/home/ashraf/jacoco/org.jacoco.agent-0.7.4.201502262128-runtime.jar=destfile=/home/ashraf/jacoco/jacoco.exec,output=tcpserver,address=*"


3. started the wildfly server that has one of our application .ear file also deployed. The java process looks like the following:


[root@dvs02 ~]# ps -ef|grep java
root 4786 4736 99 12:43 pts/2 00:00:25 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-3.b17.el7.x86_64/jre//bin/java -D[Standalone] -server -Xms64m -Xmx1024m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -javaagent:/home/ashraf/jacoco/org.jacoco.agent-0.7.4.201502262128-runtime.jar=destfile=/home/ashraf/jacoco/jacoco.exec,output=tcpserver,address=* -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/opt/ndvr/scheduler/wildfly-10.1.0.Final/standalone/log/server.log -Dlogging.configuration=file:/opt/ndvr/scheduler/wildfly-10.1.0.Final/standalone/configuration/logging.properties -jar /opt/ndvr/scheduler/wildfly-10.1.0.Final/jboss-modules.jar -mp /opt/ndvr/scheduler/wildfly-10.1.0.Final/modules org.jboss.as.standalone -Djboss.home.dir=/opt/ndvr/scheduler/wildfly-10.1.0.Final -Djboss.server.base.dir=/opt/ndvr/scheduler/wildfly-10.1.0.Final/standalone -b=0.0.0.0
root 4907 644 0 12:43 pts/2 00:00:00 grep --color=auto java
[root@dvs02 ~]#

4. Executed one of the jmeter script that hits one of our REST APIs of our application

5. Expected the .exec "/home/ashraf/jacoco/jacoco.exec" to be generated. But the file didn't got generated.

6. I shutdown the Wildfly server and still the .exec "/home/ashraf/jacoco/jacoco.exec" is not getting generated.

Please advice me on what could be wrong.

Thanks,
Ashraf

Marc Hoffmann

unread,
Oct 11, 2017, 4:03:40 AM10/11/17
to jac...@googlegroups.com
Hi,

if you want a file to be created the output has to be 'file', not
'tcpserver'.
Please see documentation:

http://www.jacoco.org/jacoco/trunk/doc/agent.html

Regards,
-marc

avaz

unread,
Oct 11, 2017, 8:31:35 AM10/11/17
to JaCoCo and EclEmma Users
Thanks a lot Marc. That was the issue.
After changing it to "file", everything worked fine.

Thanks,
Ashraf

Marc Hoffmann

unread,
Oct 11, 2017, 8:48:59 AM10/11/17
to jac...@googlegroups.com

Good to hear!

Have fun with jaCoCo!
-marc

--
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 jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/c134c3fd-e5a5-4bac-b104-9781fa94e774%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

 

supar...@gmail.com

unread,
Nov 15, 2017, 6:41:02 AM11/15/17
to JaCoCo and EclEmma Users

Hi,
We were working on this some times back and realized that not much help is available in internet over this.

Feel free to check out our solution here:

http://www.qalearningguide.com/2017/10/code-coverage-for-android-using-jacoco.html

Hope this helps you as well.

Thanks,
Suparna

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages