One thing that have irritated me with the code coverage tool in Visual Studio 2005-8 is that you can’t exclude things from the code coverage result.
For example - in VB.NET the MySettings-class is generated for each assembly that is created. The code in it is automatically generated and you shouldn’t change it (it even says so in a comment from the tool…). However it is counted when the code coverage result is calculated.
The same thing applies for proxy-classes to web services for example.
This gives an incorrect picture on how much of your code that is tested. But now I’ve found an attribute that might help:
This attribute tells the compiler that the code that is decorated with the attribute is not written by the user and should not be step into during debugging sessions. So when the testing tool encounters the attribute it will simply not...