code coverage information missing from exec file

31 views
Skip to first unread message

rajesh.d...@gmail.com

unread,
Apr 8, 2019, 1:19:55 PM4/8/19
to JaCoCo and EclEmma Users
Hello,
I am using jacoco to collect code coverage for the class library we own. I am using maven to run the unit tests. I am setting MAVEN_OPTS to include path to the jacoco agent to enable code coverage. I see that jacoco.exec file gets generated at the end of the test run though the exec file doesn't contain the classes that were tested in the unit tests. I used "java -jar jacococli.jar execinfo ..." command to verify that the classes were missing.
Now, this happens only in a remote environment (on a teamcity agent), whereas the exec file contains the class information I expect when I run the unit tests locally.
Wondering what could lead to this discrepancy in local versus remote execution?

Thanks!

Evgeny Mandrikov

unread,
Apr 9, 2019, 5:09:44 AM4/9/19
to JaCoCo and EclEmma Users


On Monday, April 8, 2019 at 7:19:55 PM UTC+2, rajesh.d...@gmail.com wrote:
I am setting MAVEN_OPTS to include path to the jacoco agent to enable code coverage.

MAVEN_OPTS affects JVM that runs Maven.
 
I see that jacoco.exec file gets generated at the end of the test run though the exec file doesn't contain the classes that were tested in the unit tests. I used "java -jar jacococli.jar execinfo ..." command to verify that the classes were missing.
Now, this happens only in a remote environment (on a teamcity agent), whereas the exec file contains the class information I expect when I run the unit tests locally.
Wondering what could lead to this discrepancy in local versus remote execution?

Given the above statement, logically to assume that this depends on how exactly TeamCity executes Maven. Please contact TeamCity support.

P.S. IMO execution of tests in the same JVM as Maven is a bad idea in general.

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