Getting Code Coverage to Work in Visual Studio

Published 18 August 08 01:49 PM | Avi Pilosof 

Are you sick of seeing this error?:

"Code coverage is not enabled for this test run"

I was working on a project where my COV results were always giving the above error, and it took some figuring out. Basically, it came down to two things:

  1. I had the following setting switched off, so I wasn't being warned.
  2. I was using Ctrl+R, Ctrl+A to run my tests. That puts them in Debug mode (which isn't supported with COV), and which I had never realized. I should have been using Ctrl+R, A (ie; taking my finger off the Ctrl key before pressing 'A').

You live, you facepalm, you learn.

 

Avi

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Team System News said on August 18, 2008 10:32 AM:

Vijai Kalyan on MSBuild + VCProject Hell Avi Pilosof on Getting Code Coverage to Work in Visual Studio...

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required

About Avi Pilosof

I'm a dev living in Sydney, working for Redmond - the best of both worlds :) My team writes applications (mostly web) used internally within MS.

Search

This Blog

Syndication

Page view tracker