dotCover is not showing Code Coverage

Symptoms

The assemblies you are trying to cover are not present in the coverage report or have 0% coverage.

 

Possible cause

  • dotCover is unable to find assemblies’ PDB files.
  • Assemblies’ PDB files do not match corresponding DLL files. For example:
    • the files were created by different builds;
    • DLL files were obfuscated.

 

Solution

dotCover integrated in Visual Studio

  • Disable solution structure matching in the coverage results toolbar:

    2018-05-29_1547.png
  • Check that your target assemblies are built with PDBs.
  • Check that the results are not filtered out with coverage filters (see dotCover | Edit Coverage Filters in the main menu).
  • In ReSharper | Options… | Tools | Unit Testing, disable Shadow-copy assemblies being tested.
  • Try to Drop coverage data with a trash bin icon mceclip0.png

 

dotCover console runner

  • Check that your target assemblies are built with PDBs.
  • Check that the results are not filtered out with coverage filters.

(NUnit) Disable shadow-copying by running coverage with an additional /noshadow argument.

11 out of 137 found this helpful
3 comments

I see issues with dotCover when you mix different framework targets in one solution. I had assemblies for .net core 3.1 and 3.0. dotCover doesn't show any test coverage for 3.0 assembly. After change to the same target for all assemblies it works again.

2

File | Settings | dotCover | Highlighting  and check the 'Enable Highlighting' checkbox.
I have had to enable this after updates it gets unchecked sometimes.

0

Had the same issue, solved it by invalidating the cache.
File -> Invalidate caches...

1

Please sign in to leave a comment.

Have more questions?

Submit a request