4

I am working on the code coverage for my application.I am able to see the code coverage results from VS 2017(DotCover). But when i try to do the same from command line, the output file gets generated and it is showing empty results. Below is the command i have tried:

C:\Users\Administrator\AppData\Local\JetBrains\Installations\dotCover08\dotCover.exe cover /TargetExecutable=C:PATH\nunit3-console.exe /TargetArguments=C:\PATH\bin\Release\Poject.UnitTest.dll /Output=AppCoverageReport.dcvr /LogFile=Log.txt

In the log, it says "Coverage analysis: Instrumentation was requested, but wasn't made".

Please help to resolve it.

vinay
  • 1,276
  • 3
  • 20
  • 34

1 Answers1

0

Had the same problem and this warning turned out to be a red herring; the actual problem was in dotCover somehow not picking up assemblies which I wanted to analyze. The proper report was generated after adding the /Scope parameter; in your case it would be something like

C:\Users\Administrator\AppData\Local\JetBrains\Installations\dotCover08\dotCover.exe cover /TargetExecutable=C:PATH\nunit3-console.exe /TargetArguments=C:\PATH\bin\Release\Poject.UnitTest.dll /Scope=C:\PATH***.dll /Output=AppCoverageReport.dcvr /LogFile=Log.txt

Also, I assume that you have .pdb files for your assemblies; 'bin\Release' does not usually have them, so you might also try changing to Debug

Maksim Satsikau
  • 1,444
  • 11
  • 11