The Ramblings of Two Microsoft .NET Developers, TFS, and Visual Studio ALM Guys --- "Yes, we are both named Ed."

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:

NotWorking 

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

SelectTestMenu

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

SelectApp

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

 

Thanks,

Ed K.

Posted in VSTS


Tuesday, April 22, 2008 2:18:03 PM (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!
Name
E-mail
(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