1

I and using OPenCover to get the code coverage and want to filter test assemblies, Spring.NET assembly and autogenerated code from OpenCover report. I am passing following parameters to Opencover

OpenCover.Console.exe -register:user -target:"D:\Softwares\OPenCover\TestProj.dll" -filter:"+[*]* -[Namespace1.Namespace2.*.*Test]* [Spring*] Spring*.* [*ArchiveXSD*].ArchiveXSD.* [Namespace1.Namespace2.Namespace3.Namespace4.*.*XSD*]*" -mergebyhash -output:C:\Reports\projectCoverageReport1.xml -skipautoprops -hideskipped:All

However in the generated report I still see coverage for the XSD and Spring.NET (which is ZERO).

Have I used the switches for inclusion and exclusion correctly?

Thanks,

4

1 回答 1

1

您需要在每个过滤器上添加包含/排除标记 (+/-),例如

-filter:"+[*]* -[Namespace1.Namespace2.*.*Test]* -[Spring*]Spring*.* -[*ArchiveXSD*]ArchiveXSD.* -[Namespace1.Namespace2.Namespace3.Namespace4.*.*XSD*]*"
于 2015-03-17T09:23:08.623 回答