Unified code coverage report based on different Azure DevOps analyses

We are using Azure DevOps for the build stage. There are the following two different jobs:

  • Build + unit tests, publish artifacts
  • Long running integration tests

These two jobs runs parallel so we have code coverage files comes out in job A and job B. How should we send these files to the sonarcloud, so that the sum coverage of these files get calculated. Because we need a SonarCloudPrepare@1 and SonarCloudAnalyze@1 in each job does we?

I have already read the following topics:

Is the only way, to collect these files and send them together to sonarcloud. I thought it could be possible that sonar is smart enough and collect some extra.properties for situations like these as you can see in your own repository: extraProperties: sonar.analysis.prNumber but it has no effect so far.

I decorated each SonarCloudPrepare@1 task with these properties but it has no effect so far. The main branch has around 80% the PR with the two parallelize azure devops jobs around 24,5%.

TIA for your help
BG Simon

Hi @planbsim

I’m affraid this is not currently possible. When SonarCloudAnalyze task kicks in, you’ll need to have all coverage files available so that we can pick them up.

HTH,
Mickaël

Thanks for the clarification

BG Simon

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.