Sonarqube .NET Coverlet no producing results

Good morning. We are having a problem about Sonarqube analysis regarding test coverage. In some projects in our organisation, the coverage dropped from 88% to 8.9% without apparently doing any thing for it. We are using Sonarqube version 8.9.9 LTS and coverlet to ship results to Sonarqube.
cs project file:

<PackageReference Include="coverlet.collector" Version="3.1.2">
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>

Any help or direction to troubleshoot this would be great. Thank you.

Hi,

I’d start by taking a look at the job logs to make sure that 1) tests are run and coverage reports are generated and 2) the coverage reports are picked up by analysis.

Additionally, I’d check to see what, if anything else changed. Did maybe a lot of LOC get added and that skewed the ratio?

 
Ann

1 Like