Code Coverage Not Enabling

I seem to recall some sort of post similar to this but I can't find it ... so here it goes.

I had code coverage enabled and it was working great! I then turned it off, and want to enable it again. I went the Test -> Edit Test Run Configurations -> local.... and in the Code Coverage section selected the artifact to instrument. Ran the unit tests, but when I select the code coverage results button to view the results, it always states that code coverage was not enabled for the test run.

What can I do to get code coverage to turn back on?

[559 byte] By [CindyBrucato] at [2008-2-4]
# 1
Hi Cindy,

This kind of error happens in two cases:

1. you are running tests with different run configuration (probably one without code coverage). You may check that by going to main menu: Test\Select Active Test Run Configuration.

or

2. Instrumentation of artifacts failed and we have internally disabled the code coverage. Check the run details (through Test Results window, "Run Details" button, or the link in the status of that tool window) for any run level warnings regarding code coverage.

BorisVidolovMSFT at 2007-9-8 > top of Msdn Tech,Visual Studio Team System,Visual Studio Performance Tools (Profiler)...
# 2
Hi Boris,

Thanks for the reply. I only had one active test run configuration, I went to the menu and selected it to ensure that it was indeed checked (even though it is the only one) and then ran the test with code coverage enabled. It worked!

Thank you! Smile

CindyBrucato at 2007-9-8 > top of Msdn Tech,Visual Studio Team System,Visual Studio Performance Tools (Profiler)...

Visual Studio Team System

Site Classified