Question

I am using dotCover 2.2 with VS 2010 Pro and NUnit 2.6.2 12296.

From dotCover Unit Tests Sessions I can select an individual test, right click and get the option to "Cover Unit Test with dotCover" which appears to run just the one test, yet does not change the highlighting for the tests not run. I am expecting the code coverage highlighting to be cleared then display only the code coverage highlighting in green for the single test.

While I am able to get dotCover to highlight the code covered by all of the unit test, I would like to run just one unit test and see only highlighted that code which is covered by that unit test.

Is this possible? If so, how?

Was it helpful?

Solution

You need to create a new test session to cover the test with.

You can do this by right clicking the test you want to individually cover and click 'Create New Session' from the drop down. Then when you run your code coverage, it will only create a coverage report from the single test in your new test session.

DotCover stores the coverage results from an entire test session and uses it to display the code highlighting. When you were running the individual test in the existing test session, you were only updating the coverage results in the existing coverage report. By creating a new session, you create an empty coverage report.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top