Code coverage unit test

The Code coverage feature in Visual Studio has been simplified and provides lots of information on coverage. It also provides different colors for coding the coverage and a detailed report. Basically, code coverage is used to determine the percentage of actual project code covered and tested as a part of unit testing. Covering a large proportion of code is always better. The Code coverage analysis can be applied for both managed and unmanaged code.

In the current and recent version of Visual Studio, the Code Coverage Results option is merged along with the Test Explorer window. The results table shows the percentage of the code that was run in each assembly, class, and method. The source code editor also shows which code ...

Get Software Testing using Visual Studio 2012 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.