Skip to content

Code coverage returns NAN% #942

@dozer75

Description

@dozer75

I have seen some reports of this here, but they doesn't have any solutions due to inactivity, so I'll try again.

I have a test project using coverlet, but whenever I try to run either dotnet test /p:CollectCoverage=true or the coverlet command I get the following result and an empty coverlet file.

Test Run Successful.
Total tests: 47
     Passed: 47
 Total time: 1,3797 Seconds

Calculating coverage result...
  Generating report 'XXXX'

+--------+------+--------+--------+
| Module | Line | Branch | Method |
+--------+------+--------+--------+

+---------+------+--------+--------+
|         | Line | Branch | Method |
+---------+------+--------+--------+
| Total   | 100% | 100%   | 100%   |
+---------+------+--------+--------+
| Average | NaN% | NaN%   | NaN%   |
+---------+------+--------+--------+

I have referenced both coverlet.collector and coverlet.msbuild packages in my project...

Any ideas why or suggestions how to find more information about the issue?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions