Code Coverage is not supported in Visual Studio 2010 Professional

If you are looking to enable code coverage in your unit testing in Visual Studio 2010 Professional, then please beware that it is not supported. You’ll notice that if you edit the local.testsettings file, the left hand pane does not have a section called Data and Diagnostics.

The solution is therefore one of the following:

  1. Upgrade to a version of Visual Studio 2010 that supports code coverage (which is expensive), or
  2. Use another unit testing framework, such as NUnit (which is free)

What a choice….