Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dotCover not showing all of the projects in a solution

Let me start by saying I'm new to both ReSharper and dotCover and that I'm using v10.0.2 of both.

The attached screenshot shows solution explorer in VS and the coverage tree for a set of tests.

Whenever I run coverage, it always shows the same subset of assemblies in the coverage tree. Importantly, all of the tests shown are for code in either the Services or Infrastructure assemblies, neither of which show in the coverage tree.

Clearly, the product is not doing something right or I'm not.

  • Why are only some of the assemblies shown in the coverage tree?
  • Why aren't any of the assemblies covered by the tests I'm running shown in the coverage tree?
  • How do I make it work properly?

EDIT If it makes any difference, I'm using xUnit and have the xUnit running extension installed in ReSharper and the tests themselves run just fine.

Screen shot

like image 805
Stuart Hemming Avatar asked Jan 22 '16 17:01

Stuart Hemming


Video Answer


2 Answers

This is due to shadow copying - when enabled, dotCover expects .pdb files to be copied too, and the standard shadow copy that xunit performs doesn't do this. If you disable shadow copy in the Unit Testing options page, it'll work fine. I think the xunit runner can be updated to fix this.

The YouTrack issue that describes what's going on is here: DCVR-7976

like image 91
citizenmatt Avatar answered Sep 24 '22 02:09

citizenmatt


In my case the *.pdb files where deleted by a post-build event. After changing that, coverage-analysis worked again. This post from the support forum of jetbrains helped me

like image 28
ChrisM Avatar answered Sep 23 '22 02:09

ChrisM