Funny version: The Code Coverage report doesn’t contain any coverage data for the included files

Hi,

I’m using SonarCloud.io Free Edition for my open source projects on GitHub.com. To make my work easier I use reusable workflows (Repo: GitHub - dailydevops/pipelines), which I also use in almost all of my .NET repositories. Everything works fine, except for one repository extensions.test. This one produces coverage reports (format: opencover), but they are not evaluated.

Here I get the following error message, over and over again…

INFO: Parsing the OpenCover report /home/runner/work/extensions.test/extensions.test/./tests/NetEvolve.Extensions.NUnit.Tests.Unit/TestResults/ac8439ed-5d8a-4d07-9657-e099e52d4b4f/coverage.opencover.xml
INFO: Adding this code coverage report to the cache for later reuse: /home/runner/work/extensions.test/extensions.test/./tests/NetEvolve.Extensions.NUnit.Tests.Unit/TestResults/ac8439ed-5d8a-4d07-9657-e099e52d4b4f/coverage.opencover.xml
INFO: Parsing the OpenCover report /home/runner/work/extensions.test/extensions.test/./tests/NetEvolve.Extensions.XUnit.Tests.Unit/TestResults/a050e592-b158-4f2d-bc0f-d022c151a380/coverage.opencover.xml
INFO: Adding this code coverage report to the cache for later reuse: /home/runner/work/extensions.test/extensions.test/./tests/NetEvolve.Extensions.XUnit.Tests.Unit/TestResults/a050e592-b158-4f2d-bc0f-d022c151a380/coverage.opencover.xml
INFO: Parsing the OpenCover report /home/runner/work/extensions.test/extensions.test/./tests/NetEvolve.Extensions.MSTest.Tests.Unit/TestResults/535f88e8-9a6e-42ee-afd1-94757b99af44/coverage.opencover.xml
INFO: Adding this code coverage report to the cache for later reuse: /home/runner/work/extensions.test/extensions.test/./tests/NetEvolve.Extensions.MSTest.Tests.Unit/TestResults/535f88e8-9a6e-42ee-afd1-94757b99af44/coverage.opencover.xml
INFO: Coverage Report Statistics: 55 files, 0 main files, 0 main files with coverage, 55 test files, 0 project excluded files, 0 other language files.
WARN: The Code Coverage report doesn't contain any coverage data for the included files. Troubleshooting guide: https://community.sonarsource.com/t/37151

I have already read the linked troubleshooting guide. However, it does not bring me any further. Especially since all other repositories wonderfully determine the code coverage, calculate and upload to SonarCloud.io.

Therefore, I ask for help. Many thanks in advance

Greetings
Martin

Ok, found the issue.
Since I create projects that extend existing TestFrameworks (MSTest, NUnit & XUnit), I had to mark the projects with <SonarQubeTestProject>false</SonarQubeTestProject>.

Hint I have found here - Analysis of product projects vs. test projects · SonarSource/sonar-scanner-msbuild Wiki · GitHub;

1 Like