TheDevOpsGuru
TheDevOpsGuru

Reputation: 1580

“No information about coverage per test.” from Sonar with Jacoco Maven build

While trying to get a Sonar execution to import a jacoco-it.exec file that was produced on a server with the jacocoagent.jar, I get the following message:

[INFO] [09:54:32.420] Sensor JaCoCoItSensor... [INFO] [09:54:32.462] Analysing /../jenkins/jobs/../jacoco-it.exec [INFO] [09:54:51.385] No information about coverage per test.

I have verified that the jacococ-it.exec file itself does in fact have data in it (385 MB) so it definitely is capturing information, but sonar is not able to reconcile it and I need help fixing it.

I am using:
a multi-module maven project
Sonarqube 4.5.1
Jenkins Sonar Plugin 2.1
Oracle 11g
jacoco 0.7.4
junit 4.11

Sonar creates and uses the UT file jacoco.exec just fine, but I get 0% when it displays the IT results.

[EDIT] - To further clarify
1. we have the jacocoagent.jar monitoring a jvm on an application server
2. a Jenkins job runs a group of selenium tests against the application server in #1
3. the jacoco-it.exec file is copied from the application server to a location that sonar can read. For this I am overriding the sonar it path for the jacoco plugin.
4. I get the above messages that say that sonar can't find the coverage information

The selenium tests are running as integration tests from mvn with:
mvn org.jacoco:jacoco-maven-plugin:prepare-agent-integration clean package install

Upvotes: 2

Views: 3603

Answers (1)

Alix
Alix

Reputation: 2837

Try forcing an older version (e.g. 0.7.3) of the jacoco-plugin to see if it makes any difference. This has helped for me with a similar problem. I think that there is a known issue in some version(s).

Upvotes: 2

Related Questions