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.
closed as primarily opinion-based by IAmMilinPatel, NarendraC, Yu Zhang, Kate Paulk♦, Paul Muir Oct 25 '16 at 12:49
Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.
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.