As of dotCover 2.0, there is support for attribute filters. This basically allows you to exclude any code marked with a certain filter from your coverage report. There is okay documentation out there for this usage, notably on the TeamCity documentation where they cover integration with dotCover.

The basic syntax used there is -:myAttributeName or -:module=myModuleName;myAttributeName to exclude an attribute or an attribute within a module respectively. This doesn't work when passed to the dotCover console runner. The coverage report still shows the excluded code.

Does dotCover support the attribute filter in its console (I assume so since TeamCity basically just passes the arguments through to the console runner) and is there a known syntax that works for it?

有帮助吗?

解决方案

Attribute filters specification differs a bit in dotCover console runner and in TeamCity. In dotCover you can use the following command line key: /AttributeFilters=ARG

ARG has the following syntax: attribute1;[module]attribute2;... where "attribute" is fully qualified attribute type name (asterisk wildcards (*) are supported), and "module" is an optional parameter which specifies name of the assembly where attribute was defined.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top