Sunday, January 31, 2010

Enable code coverage in Visual Studio 2010 Beta 2

I have started to code in Visual Studio 2010 BETA 2 and I have some unit tests that are already written up. I wanted to turn on the code coverage. It took a while to figure this out.

First thing I noticed when I double clicked on the Local.testsettings file is that the interface has changed and there are more options than I am used to.

image

After pocking around for sometime, I discovered that there was a Code coverage check box that I could check.

image

But even then I could not get the tests to capture the code coverage.

image

After more pocking :), I found that by double clicking on the Code coverage line in the “Data and Diagnostics” side tab, it opens up the Code Coverage Details window that lets you select the assemblies you want to include for code coverage.

image

Once I selected my assemblies, I was able to capture the code coverage matrix.

Namaskara,

Harsha

No comments:

Post a Comment