How to exclude test assemblies from the coverage report running from command line

coverage.png
coverage1.png
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

3 comments
Comment actions Permalink

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;

0
Comment actions Permalink

/Filters=+:module=*;class=*;function=*;-:module=MyAssembly.Web.Tests;

Fixed

0
Avatar
Permanently deleted user
Comment actions Permalink

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.

0

Please sign in to leave a comment.