1
votes

I have a problem with the configuration of SonarQube. During the day the Jenkins server builds parts of my software but didn't start the JUnit tests. Every night starts the server a big build for all modules and starts the JUnit test for this.

I using the surefire plugin for the Maven jobs. Now I want that only the big build "sends coverage results" to SonarQube. Has anyone an idea to solve this problem? I found nothing like this on the internet.

My software versions: SonarQube 5.2 + Clover, Jenkins v1.629, Maven 3.0.4

2
Which coverage engine do you (want to) use ?benzonico

2 Answers

1
votes

I am guessing your project is a java project.

SonarQube plugins will only import coverage reports. So you would have to configure your "big build" to generate a coverage report with the engine you want to use (I would recommend JaCoCo as it is supported out of the box by the sonar java plugin, if you want to use another engine (clover, cobertura, etc...), you would have to install a dedicated plugin).

When there is a report, coverage measures will be sent to sonarqube during the analysis. If there is none, no measure will be sent.

0
votes

Use this link http://docs.sonarqube.org/display/PLUG/Cobertura+Plugin to setup code coverage in SonarQube

In addition to this you need to add cobertura-plugin in sonarqube-x.x\lib\core-plugins