Visual studio code coverage from many different unit test projects

眉间皱痕 提交于 2019-12-21 23:49:57

问题


I'm using visual studio 2015 Enterprise.

Let's say I have my main ProjectA, and two unit test projects UnitTestsA, UnitTestsB, each containing some test methods.

UnitTestsA covers 5 blocks out of 10 of my code, UnitTestsB covers 2 different blocks out of 10. When I ask visual studio to analyze code coverage, I would expect it to return 7 out of 10 blocks covered. Instead, it returns 7 out of 20 blocks covered.

Seems like it doesn't realize the 2 projects are testing the same code. Am I doing something wrong, or is it the expected behavior?

来源:https://stackoverflow.com/questions/40709909/visual-studio-code-coverage-from-many-different-unit-test-projects

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