Getting Code Coverage to Work in Visual Studio
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:
- I had the following setting switched off, so I wasn't being warned.
- 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
Comments
Leave a Comment
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.