Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dotCover filter with command line

What is the correct way to call dotCover command runner passing it several filters?

I've tried the following but it only excludes the first assembly:

dotcover c /TargetExecutable="c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\MsTest.exe" /TargetArguments="/testcontainer:c:\dev\SampleProject\UnitTests\bin\Debug\UnitTests.dll" /Output="c:\temp\Snapshot1.dcvr" /Filters="-:Assembly1, -:Assembly2"

it ignores anything after , in filter tag.

like image 332
ShaneKm Avatar asked Jan 22 '16 21:01

ShaneKm


People also ask

Is dotCover command line free?

dotCover console runner is a command-line tool distributed free of charge as an archive, as a NuGet Package (Windows, macOS, Linux), or as a . NET global tool.

Does ReSharper include dotCover?

dotCover integrates into Visual Studio 2010, 2012, 2013, 2015, 2017, 2019, and 2022. After installing dotCover with or without any other dotUltimate tools and opening Visual Studio, you will find dotCover commands under the ReSharper | Unit Tests and ReSharper | Cover in the main menu.


1 Answers

Try it with the following:

dotcover c /TargetExecutable="c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\MsTest.exe" /TargetArguments="/testcontainer:c:\dev\SampleProject\UnitTests\bin\Debug\UnitTests.dll" /Output="c:\temp\Snapshot1.dcvr" /Filters="-:Assembly1;-:Assembly2"

Instead of comma and space as the separator, try it with semicolon.

like image 184
Szabolcs Dézsi Avatar answered Sep 19 '22 11:09

Szabolcs Dézsi