OpenCover does not display test coverage even when they're executing (working with nUnit)

31 Views Asked by At

Our project needs to track test coverage. I'm new to this topic and decided opencover because of good reviews. But after start there was no visiting classes or methods, although the tests started well. The coverage is also 0%.

Here's my command:

C:\BARS\ReestrIm2014_Git01>C:\Users\Local\.nuget\packages\opencover\4.7.1221\tools\OpenCover.Console.exe "-target:C:\Users\Local\.nuget\packages\nunit.consolerunner\3.16.3\tools\nunit3-console.exe" "-targetargs:C:\BARS\ReestrIm2014_Git01\ReestrServiceLibrary.Tests\bin\Debug\net48\ReestrServiceLibrary.Tests.dll" "-register:user" "-output:opencover.xml"

And my results (no attention to failed tests, accessing to code should've happened anyway.):

Overall result: Failed
  Test Count: 121, Passed: 111, Failed: 10, Warnings: 0, Inconclusive: 0, Skipped: 0
    Failed Tests - Failures: 10, Errors: 0, Invalid: 0
  Start time: 2024-01-18 12:49:22Z
    End time: 2024-01-18 12:56:12Z
    Duration: 409.844 seconds

Results (nunit3) saved as TestResult.xml
Committing...
Visited Classes 0 of 6869 (0)
Visited Methods 0 of 82568 (0)
Visited Points 0 of 577641 (0)
Visited Branches 0 of 156125 (0)

==== Alternative Results (includes all methods including those without corresponding source) ====
Alternative Visited Classes 0 of 7016 (0)
Alternative Visited Methods 0 of 91396 (0)

Tests using framework 4.8, covered project was writing in framework 4, opencover also using 4, so this may be a point.

I've found the same problem before and tried same thing: changing .csproj and adding any tags, nothing helped. That issue was not closed then.

Can someone give me any help now? As far as I know, OpenCover project was closed 3 years ago, so contacting support is not an option.

Thank you in advance.

0

There are 0 best solutions below