ReSharper:dotCover 未显示单元测试覆盖率
在使用 ReSharper v.2021.3.3 的 Visual Studio 2019 v.16.11.10 中运行 ReSharper: dotCover 时,文件的覆盖范围不会显示/运行。
图像上显示了单元测试覆盖率的片段,其中可以看到单元测试的运行情况以及覆盖了多少测试。展开测试应该测试的包之一,可以看到ReSharper无法生成覆盖率。这是因为所有功能都打包到(1.0.0.0,.NETFramework,版本=v4.7.2)中吗?
如果这是问题,有什么解决方法吗?或者如果这条线引起任何问题,我该如何摆脱它?如果我去掉这条线,所有东西都会以不同的方式包装吗?或者一切都会像以前一样工作吗?
我团队中的其他项目之一没有将所有内容打包到其中的额外行,并且 ReSharper 可以按其应有的方式生成单元测试覆盖率。
When running ReSharper: dotCover in Visual Studio 2019 v.16.11.10 with ReSharper v.2021.3.3, the coverage on the files is not shown/run.
On the image, a snippet of the Unit Test Coverage is shown, where it is seen that the unit tests are run and how much of those tests are covered. Unfolding one of the packages that should be tested by the tests, it is possible to see that ReSharper cannot generate coverage. Is this because all the functionality is packed into the (1.0.0.0, .NETFramework, Version=v4.7.2)?
If this is the problem, is there any workaround? Or how do I get rid of the line if it causes any problems? If I then get rid of the line, will everything then be packaged in a different manner? Or will everything work the same as before?
One of the other projects in my team does not have this extra line where everything is packed into, and ReSharper can generate Unit Test Coverage as it should.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我通过清除 resharper 缓存、重新启动 Visual Studio 解决了该问题。下一次测试运行后,覆盖率计算正确。
要清除缓存,请转至
Extensions >重磨器>选项>环境>常规
并按清除缓存
按钮:I fixed the problem by clearing the resharper-cache, restarting visual studio. After the next test-run, the coverage was calculated correctly.
To clear the cache, go to
Extensions > Resharper > Options > Environment > General
and press theClear caches
-Button:在与 JetBrains 支持人员进行长时间的电子邮件通信后,问题似乎出在 dotCover 从 GAC 获取 DLL 文件上,导致 PBD 的 id 不匹配。
After a lengthy email correspondence with JetBrains's support, it seems like the problem is with dotCover grabbing the DLL files from the GAC instead, resulting in mismatched ids for the PBDs.