문제

I am using Testdriven.net to run NCover on my assemblies. However, I need to exclude certain methods from the coverage report. How can I do this?

도움이 되었습니까?

해결책

This can be achieved by declaring an Attribute named CoverageExcludeAttribute in the global (sometimes referred to as the empty) namespace and applying this Attribute on the methods you want excluded from NCover.

NCover will pick up this attribute by its name only, so there's no need to reference any external assemblies. See also this post. (It doesn't mention that the CoverageExcludeAttribute must be defined in the global namespace).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top