Tuesday, September 6, 2011

How to enable code coverage in Visual Studio 2010

The steps to enable code coverage in Visual Studio 2010 are

1. Open the testsettings as displayed below

image

2. Enable code coverage as displayed below

image

3. Double click the Code Coverage row. Select the artifacts to instrument. Specify the strong name key file path if artifacts are signed.

image

4. Run unit tests. Open the code coverage results as displayed below

image

image

1 comment: