Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SonarQube unit tests w/o binaries

After endless googling and reading tons of documentations, I am completely finsihed.

I want to import already created unit tests reports like .xml and .exec-files (JUnit and Jacoco) into SonarQube. The Problem is

Sensor JaCoCoOverallSensor...
15:54:48 15:54:48.909 INFO  - No JaCoCo analysis of project coverage can be done since there is no class files.
15:54:48 15:54:48.909 INFO  - Sensor JaCoCoOverallSensor done: 374 ms
15:54:48 15:54:48.909 INFO  - Sensor JaCoCoSensor...
15:54:48 15:54:48.910 INFO  - No JaCoCo analysis of project coverage can be done since there is no class files.
15:54:48 15:54:48.910 INFO  - Sensor JaCoCoSensor done: 1 ms 

As we have a rather large code, we do not have allways binaries of the src. So, the question is: "How can I import only the finished reports into SonarQube without having binaries?"

SonarRunner Properties

sonar.dynamicAnalysis=reuseReports
sonar.core.coveragePlugin=Jacoco
sonar.junit.reportsPath=[...]/workspace/junit/xml-results
sonar.jacoco.reportPath=[...]/workspace/junit/junit-test.exec

Any help is highly appreciated! Thanks in advance!

like image 394
TeamHundM Avatar asked Dec 04 '14 15:12

TeamHundM


1 Answers

I had the same problem migrating from sonarQube 3.7 to sonarQube 4.5. I changed the deprecated sonar.binaries for sonar.java.binaries... And suddenly my coverage didn't work anymore. . I had to revert:

MyProject.sonar.java.binaries=classes

for:

MyProject.sonar.binaries=classes

and that work for me, even sonar tells me that I'm using deprecated entries.

like image 181
Aitor Avatar answered Sep 21 '22 15:09

Aitor