victoryNap
victoryNap

Reputation: 133

Combine Jacoco Test Coverage for Sonar

I have a Jenkins instance which runs two different jobs for two sets of tests, one for unit tests and one for integration tests, and both reports the coverage of tests to Sonar using the Jacoco plugin. However, when the second of the two jobs reports coverage, it blows away the coverage for the previous job.

Short of having a single job which runs all of the coverage, is there an accepted solution to this problem?

Upvotes: 0

Views: 203

Answers (1)

G. Ann - SonarSource Team
G. Ann - SonarSource Team

Reputation: 22804

You can't update an analysis. If you want both reports reflected at the same time, you'll have to feed them into the same analysis.

However, that doesn't mean your analysis job has to run all the tests. You could have test jobs that feed their reports into the analysis job.

Upvotes: 1

Related Questions