Code Coverage In Visual Studio 2010

To run code coverage, you first need test settings for your solution. Right Click on your solution in Explorer and select new -> Test Settings

image

Then, you can hit configure and add in code coverage.

Once you add it in, you need to use the Test Output window:

image

Also, once your assembly is strong named, you need to add that to your tests:

image

Note that you are not running code coverage on your test .dlls, but on your working code assemblies.

 

VS2010 does many things well, the code coverage Easter egg hunt is not one of them.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: