How to analyze multiple test coverage files from different projects in a single SonarQube analysis u

We have a monorepo structure containing multiple Web API projects, each with its corresponding unit test project. During our GitHub Actions workflow:

  1. Each test project generates its own coverage report (OpenCover format)
  2. These reports are stored in separate artifacts (e.g., microsoft-test, dynamics-test, spotify-test, etc.)
  3. When running SonarQube analysis, we need to include coverage data from all test projects

Current challenge:

  • Multiple artifacts containing coverage.opencover.xml files
  • Need to analyze all coverage data under a single SonarQube project
  • Want to avoid coverage data being overwritten
  • Need correct consolidated coverage metrics

How can we configure our GitHub Actions workflow and SonarQube analysis to properly handle multiple coverage reports from different test projects?"

Hey there.

sonar.cs.opencover.reportsPaths accepts a comma delimited list of coverage reports, and you can use wildcards like **/*.coverage.opencover.xml (please check the actual name of your coverage reports) to find all the reports in your project.

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