i am getting 0 coverage for command line jacoco agent with a simple junit test class.

76 views
Skip to first unread message

madha...@gmail.com

unread,
Jul 10, 2015, 7:58:18 PM7/10/15
to jac...@googlegroups.com
Hi,
I trying to run a jacoco command line agent with a jenkin job.So to achieved that i just tried to create a simple test class and tried to get the coverage for that with a command line using below command.so that i could later use this for all the classes with a jenkin post bild shell script. Any way below command returns me a 0 coverage. please let me know what i am doing wrong here.

java -cp /CovTest/COverageTest/out/production/COverageTest:.:/CovTest/InstalledSoftware/idea-IU-141.1010.3/lib/* -javaagent:/home/madhawa/Desktop/jacoco-jar/jacocoagent.jar=destfile=/CovTest/COverageTest/MYTARGET/jacoco.exec,append=true,dumponexit=true,includes=MyTestClass_01 org.junit.runner.JUnitCore MyTestCase_01

Note: junit test case class : MyTestCase_01
java class : MyTestClass_01

refer original post for this:-
http://stackoverflow.com/questions/31350468/0-coverage-on-test-case-when-run-jacoco-agent-on-my-simple-test-class

Evgeny Mandrikov

unread,
Jul 10, 2015, 9:39:21 PM7/10/15
to jac...@googlegroups.com, madha...@gmail.com, madha...@gmail.com
If you never saw value different than zero, then before playing with inclusions and exclusions try to get non-zero value by removal of argument "includes=MyTestClass_01".
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages