Method-Level Attribute Inclusion

Method-Level Attribute Inclusion

Hello,

We are looking to do method-level inclusion through attributes since we want to only cover net new code for our project and there is tons of legacy code. When I tried it, it does not seem to work though, only at the class level. The attributes at the method level do work though for exclusion.

I did notice that there is no method level inclusion option, only exclusion in Explorer. Does this mean no method level attributes either?

Thanks.


RE: Method-Level Attribute Inclusion

Hi kb8coolj,

How are you attempting to include -- are you using a list of attributes, or a regex? If you're trying a regex and it's not working, I'd try the fully-qualified name of a method and see what happens.

Regarding the method-level inclusion -- if you enter your included methods in the "Attributes" section of the Runtime Includes, the methods should be included, as well. "Attributes" actually includes Namespaces, Classes, and Methods.

NCover Support


RE: Method-Level Attribute Inclusion

That doesn't seem to be the case though when I run NCover searching for attributes at the method level.

Why does NCover not support method-level inclusion in general? When I look at the Explorer interface, it shows under runtime excludes: Assemblies, Attributes, Types, Methods, Source Files. When I look at the runtime includes: Assemblies, Attributes, Types, Source Files only.


RE: Method-Level Attribute Inclusion

The honest answer from the development team is that it wasn't a priority at the time, and hasn't ever become one, though that's a bit surprising, I admit.

NCover 4, however, will have method-level inclusion.

NCover Support


RE: Method-Level Attribute Inclusion

The honest answer from the development team is that it wasn't a priority at the time, and hasn't ever become one, though that's a bit surprising, I admit.

NCover 4, however, will have method-level inclusion.

NCover Support