Code Coverage is not enabled for this test run

Have you ever seen this? Scratch your head for hours? What the heck is wrong, all I want to see is my Code Coverage from my tests!!!!

No worries, I get asked this question everyday. Here is how to make sure you instrument Code Coverage during your tests.

Here is what you probably see:


Go to the "Test" menu on your tool bar and "Edit your Test Run Configurations"


Click on the "Code Coverage" List Item and select the artifacts to instrument:


Now rerun your test(s) and you will have code coverage :)



Ed K.

Posted in VSTS

Tuesday, 22 April 2008 14:18:03 (Pacific Daylight Time, UTC-07:00)
LOL! You called by experience exactly with the new testing features in VS 2008. Guess, I'm too accustomed to NUnit and Resharper. Be nice if Microsoft provided a little bit better user experience.

Thanks for your write up! Exactly what I needed!
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, sup, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

[Captcha]Enter the code shown (prevents robots):

Live Comment Preview