0
votes

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?

1

1 Answers

1
votes

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.