Skip to content

Test coverage average coming as infinity #516

@arpymastro

Description

@arpymastro

We use coverlet with all our .NET Core projects(APIs, Libraries) and it works just fine for us.

Recently we have created one .NET Standard library and I have added .NET Core 2.2 xUnit test project in it with 2 tests. We have added coverlet.msbuild 2.5.1 nuget package to calculate the code coverage -

dotnet test -c Release --logger TRX /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=TestResults

It runs the tests, all tests are passing but the code coverage is showing as empty with average "infinity". It is not even identifying module name. Please refer attached notepad file for sample output.

What's going wrong here?
Sample output.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions