Posts Categorized: Code coverage

How to exclude test assembly from code coverage in VS 2012

Posted by & filed under .Net, Code coverage, Visual Studio.

If you are using VS 2012, by default Code coverage results are available for Test assembly also. There is no direct way to disable this behavior, either you need to use the ExcludeFromCodeCoverage attribute or you need to use the runsettings file. The ExcludeFromCodeCoverage is pretty straight forward; you need to decorate all the unit [...]