Re: Integration test coevarge showing 0% both on eclispe and sonarqube.

36 views
Skip to first unread message
Message has been deleted

Evgeny Mandrikov

unread,
Oct 16, 2019, 5:31:14 AM10/16/19
to JaCoCo and EclEmma Users


On Wednesday, October 16, 2019 at 2:01:36 AM UTC+2, ravich...@gmail.com wrote:
Hi Guys,

I see 0% code coverage from the ".exec" file generated through jacocoagent.jar. Below is the command which I set during server startup.

-javaagent:<windows_path>/lib/jacocoagent.jar=destfile=<windows_path>/Jacoco_client.exec,append=true,includes=*,output=tcpserver,address=localhost,port=6300

I got the ".exec" file using  ExecutionDataClient.java as a client.

The size of the ".exec" is showing around 600KB and I can also see the class file information inside the executable file.

When I upload the integration test execution file to eclipse mapping respective java sources, coverage shows 0%.

Same is the case when I upload it directly to Sonarqube using below properites in Jenkins.

sonar.projectKey=TEST_Jacoco
sonar.projectName=TEST_Jacoco
sonar.projectVersion=1.0
sonar.jacoco.reportPaths=<project_build>\\Jacoco_1015.exec
sonar.java.binaries=<project_build>\\Classes
sonar.language=java 

Can you please let me know how to use the view code coverage from ".exec" file generated by jacocoagent ???


This has been answered enormous amount of times, please use search - generation of report from exec file requires exact same class files as were used during execution.

Different compilers produce different class files - in case of Eclipse class files in IDE are compiled by Eclipse Compiler, and likely you use javac during build of you application.

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