Applying multiple coverage filters while merging
Applying multiple coverage filters while merging
Hello,
I am running a merge using ncover.reporting on a slew of assemblies (250+) and am trying to apply coverage filters to only include assemblies that start with my teams namespace prefix (Infrastructure*) and exclude coverage on getters and setters. I wrote a basic batch file that looks something like this:
NCover.Reporting C:\hudson\jobs\Infrastructure.Members.Api\workspace\Infrastructure.Members.Api.Test-dll-coverage-results.xml C:\hudson\jobs\Infrasctucture.REST.Proxy\workspace\Infrasctucture.REST.Proxy.Test-dll-coverage-results.xml ... //s MergeCoverage.xml //cf "Infrastructure*":Assembly:False:True //cf "*get_*":Method //cf "*set_*":Method //or FullCoverageReport:Html //op "C:\NCoverProjects\Reports\FullCoverageReport" //p "Infrastructure"
However, when I view FullVoverageReport.html I still see the dependent assemblies and getters and setters being included. What am I doing wrong?
Thanks in advance!
RE: Applying multiple coverage filters while merging
Thanks for your question, rkb9572.
I tried these filters on one of my test projects:
//cf "BusinessObjects*":Assembly:False:True
//cf "*get*":Method
//cf "*set*":Method
Only BusinessObjects was included, and all my get and set methods were excluded. Hopefully, that modified wildcard syntax will work as you expect. I was also successful with regex pattern 'get.*'
I'm not sure why the wildcard assembly filter isn't working for you, but I did notice some typos for "infrastructure" in the second coverage file path. Can you verify that the actual assemblies are all spelled the same?
Hope this helps!
NCover Support
RE: Applying multiple coverage filters while merging
That worked! And the typo was purely my own in the post. The namespaces are correct. Thanks so much!
RE: Applying multiple coverage filters while merging
I'm very glad to hear that, and you're very welcome!
Just so I know for future reference, did you change your 'Infrastructure*' filter at all, or did the original work?
NCover Support