Pergunta

NCover has an attribute IgnoreFromCoverage that allows for code to be marked for exclusion during code coverage analysis. Is there a way to do this with the VSTS Code Coverage Tools?

Obvious uses for this would be auto property getters and setters, non obvious uses may be code generated by R# equals implementation or ORM generated code.

Foi útil?

Solução

For Visual Studio 2010 you can use the ExcludeFromCodeCoverage attribute. You can apply the attribute to an entire class or to methods within a class. See MSDN for more information.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top