How to exclude test assemblies from the coverage report running from command line Follow
Hi there,
I'm having trouble getting my tests dlls excluded from my coverage report.
Perhaps you could explain how this is achieved from the command line.
I've tried the following
/Filters=-:*.Tests
This however stops anything being reported. I also tried explicitly
/Filters=-:MyAssembly.Web.Tests
Which also stops any reporting on MyAssembly.Web. This does seem like a bit of a bug to me? Maybe I'm just formulating the filter correctly though.
Does it need to be the path to the dll or just the name of the dll?
I'm using dotCover v2.0.425.72.
Also I've installed xUnit contrib dlls for dotCover 2.0
Thanks
Neil
Please sign in to leave a comment.
I'm still having this issue, any help would be greatly appreciated.
I've also tried the following, but this kills the coverage report as well.
/Filters=-:module=MyAssembly.Web.Tests;
/Filters=+:module=*;class=*;function=*;-:module=MyAssembly.Web.Tests;
Fixed
Hello Neil,
I'm sorry for the late reply and I'm glad that you have found a workaround!
You are right, the fact that the filter "/Filters=-:*.Tests" filters out everything from the report looks like a bug. I've created a corresponding issue in our tracker: http://youtrack.jetbrains.com/issue/DCVR-4970. It will be fixed in the nearest release.
Thank you for the information!
Best regards.