trying to run the open cover as below
opencover.console.exe -target:"C:\Users\rkapiset\Downloads\xunit-1.8\xunit.console.clr4.x86.exe" -targetargs:"""E:\Office\CRM\dotnet\1 - UI\EYC.CRM.UI.Tests\bin\Debug\EYC.CRM.UI.Tests.dll""" -filter:+[EYC]* -output:coverage.xml
below is the result
61 total, 3 failed, 0 skipped, took 1.674 seconds
Visited Classes 0 of 0 (NaN)
Visited Methods 0 of 0 (NaN)
Visited Points 0 of 0 (NaN)
Unvisited Classes
Unvisited Methods
Any hints where i'm going wrong? thanks in advance.
There are a couple of keys to getting this to work.
Example:
"C:\OpenCover.4.6.166\tools\OpenCover.Console.exe" -output:"C:\MyProject\coverage.xml" "-target:C:\MyProject\packages\xunit.runner.console.2.0.0\tools\xunit.console.exe" -targetargs:"\"C:\MyProject\Project.Tests\bin\Debug\Project.Tests.dll\" \"C:\MyProject\Project\bin\Debug\Project.exe\" -noshadow" -filter:"+[*]Project.* -[*.Tests]*" -register
Cite: http://derekwilson.net/derekblog/post/2012/05/29/Using-OpenCover-and-xUnit.aspx
Have you registered the profiler?
try the -register switch or if under UAC -register:user
All the switches are explained on the OpenCover Wiki
Alternative you can use regsvr32 on each of the profilers OpenCover.Profiler.dll in the x86 and x64 folders in the installed program files folder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With