I would like to integrate Cobertura in order to have reports for each build but I do not know what is the best place to integrated it.

Cobertura integration (for reports) should be integrated in Jenkins or SonarQube level?


SonarQube only accepts processed data, so you have to generate the data while running tests with a build-server (Jenkins in your case).

From the SonarQube code coverage documentation:

The Java Plugin is going to reuse reports and not generate them, so before trying to configure your analysis to import these reports, you need to be sure they are correctly generated and not empty.

  • The tests execution reports have to comply to the JUnit XML format.
  • The code coverage reports have to be generated by Cobertura, or JaCoCo (details below).

You might need to configure something on the SonarQube side to import the data, but it should be generated on the build-server.

Technically the answer probably is that it should be integration in both.

Not the answer you're looking for? Browse other questions tagged or ask your own question.