I've been trying to get Visual Studio's code coverage working but found that it doesn't factor into its coverage metrics any DLLs that have 0% coverage, which inflates your overall coverage. So I downloaded a trial of dotCover. I already had a Resharper license, which ran my unit tests just fine. But since I installed dotCover it won't execute a single test. It correctly draws the hierarchy of unit tests and identifies all 863 tests, but after it completes its "test run" it says that 0 tests failed, but none of the tests are green (or red).
Even if I try to run just a single unit test it won't highlight that test green or red. And if I try to debug a test and set a breakpoint in the test I see that it switches to debug mode but it never breaks at my breakpoint, so obviously it never executed the code.
So uninstalled dotCover to verify that Resharper still runs my tests OK. To my surprise it failed to run them as well. So I tried to think of what had changed since I had last ran my unit tests with Resharper, and it was all my efforts to get Visual Studio's code coverage setup. So I turned off Visual Studio's code coverage in my test settings file, and then Resharper ran my unit tests just fine. Problem solved?
Time to reinstall dotCover and retry. With dotCover reinstalled I tried running unit tests and it works like a champ. So the
I hope my struggle helps someone else avoid the same situation!
Thanks for listening,