How do I get both test detail and coverage using NUnit and dotCover?

Viewed 551

I'm running dotCover with NUnit3 to get coverage reports on our build server. We also need the detail output from NUnit to show the test results. Is there any way to get both the NUnit test detail and the files for dotCover without running NUnit twice? Or do I need to run NUnit for the detailed testing then run dotCover with NUnit for coverage reporting?

2 Answers

The /TargetArguments or <TargetArguments> needs to include the command line arguments that NUnit3 uses (not "/xml=" as in NUnit2, but something else).
For NUnit2 /TargetArguments="AppTests.dll /xml=D:\CCNET\Logs\Projects\AppTestsResult.xml"

So full command for NUnit2 is:
D:\DotCover\dotcover.exe cover /TargetWorkingDir="D:\Projects" /TargetExecutable="packages\NUnit.Runners.2.6.4\tools\nunit-console-x86.exe" /TargetArguments="TheApplication\bin\Debug\AppTests.dll /xml D:\CCNET\Logs\Projects\AppTestsResults.xml /framework:net-4.0 /noshadow /exclude:Manual /work=D:\CCNET\Temp" /Output=D:\CCNET\Logs\Projects\AppTests.dcvr /LogFile=D:\CCNET\Logs\Projects\DotCoverAppTests.log /TempDir=D:\CCNET\Temp

Getting quotes in <TargetArguments> may require use of &quot;

Related