dotCover not showing all of the projects in a solution

℡╲_俬逩灬. 提交于 2019-12-01 04:19:10

问题


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.


回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/34952149/dotcover-not-showing-all-of-the-projects-in-a-solution

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!