views:

201

answers:

1

Does anyone know of an easy way to work backwards from the VS2010 code coverage in-file highlighting to the test that provides the coverage? I have a file with one method covered and another not but looking through my tests I can't spot the one providing the current coverage. It would be great to be able to navigate back from the code highlighting.

Thanks

+1  A: 

Test coverage information is mostly boolean data which has been OR'd together. When you execute test A, and probe location P is hit, tools remember that P has been executed. If you execute test B, and the same probe location P gets hits, the tool remembers that P has been executed. So coverage(P)=executedby(A) OR executed(B).

The good news is you get coverage data. The bad news is that you cannot distinguish by looking at coverage(P) whether A or B caused it.

Your only real option is to run each test separately and record the results.

Ira Baxter
Easier said than done when we have over 500 tests!
Chris Surfleet
If you can run the entire set of tests from a script, then you can make a script that runs the tests individually.
Ira Baxter