With Version 1.5.2, NCover introduced a Attribute-Based Type Exclusion. It works, but not as I expected.
I normally use NCover together with my test code. When I have a class to test that throws an exception the test function is not covered completely.
The function BarTest() is only covered to 67% as the end of the function is not executed because the Exception was thrown. I was waiting for the possibility to define that a function does not need to be covered with adding an attribute to the Function. But when I add an Attribute to the function and define this Attribute to be excluded (with //ea AttributeName), the Function is not covered.
So instead of having a higher code coverage I have a lower code coverage. Not the result I was expecting from this feature.
But maybe this will change in the future. I keep watching…