dotCover and xUnit not gathering coverage statistics from some projects

My solution results in a web.dll which references core.dll, which references core.resources.dll

core.resources.dll is one that VS2013 creates from a resource file - I didn't create it and have not tried to control it.

web.dll and core.dll are mine, under my control and there are test projects with over 1000 xUnit tests on classes and members within these dlls.(Test.Core tests Core and Test.Web tests Web (obvs))

I'm using powershell scripts to control the build, to enable teamcity and git to handle some of the work, but i can also run the scripts locally in a powershell terminal.

The build succeeds and relevant .pdb files are created alongside the .dll files, then I'm using DotCover (2.7.2) to run the tests and analyse the results.

Even though the tests all pass the resulting coverage file has no data concerning my web or core projects, but the VS-generated core.resources dll has been analysed (and only 19% covered - wtf?)


Can anyone tell me how I might persuade dotcover and xunit to work properly on my solution?

Bonus credit for anyone who can explain why the auto-generated project dll gets covered but my code doesn't.

Here's an example command line...

Exec { & "C:\Program Files (x86)\JetBrains\DotCover\v2.7\bin\dotCover.exe" cover "/TargetExecutable=C:\path\to\solution\Packages\xunit.runners.1.9.2\tools\xunit.console.clr4.exe" "/Filters=-:Test.core;+:class=core*" "/TargetArguments=C:\path\to\solution\Test.Core\bin\Release\Test.Core.dll /xml C:\path\to\solution\Test.Core.dll.xml" "/Output=C:\path\to\solution\Test.Core.dll.dcvr" "/LogFile=C:\path\to\solution\DotCover.log.txt" }

Ekaterina Solovova
Comment actions Permalink

Hello Brian,

It seems to me that the problem may consist in the filters that you have specified: string "-:Test.core;+:class=core*" means that your report will include only classes with fully qualified names starting with "core" prefix and won't include any classes from "Test.core" assembly. Could you please try to repeat coverage analysis without filters and tell me whether it helps or not?

Best regards.

Comment actions Permalink

You're correct. My filters were interfering.

I guess I had not understood the required filter syntax to make sure my dlls were covered while safely ignoring the auto-generated and third party dlls.

Thank you for your help.


Please sign in to leave a comment.