question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test's not working when using Coverlet Collector

See original GitHub issue

Hi,

I’m trying to use the coverlet collector and it does not exit the tests. I have 85 tests that take about 35 seconds to run. But when I run dotnet test --collect:"XPlat Code Coverage" it runs forever I have to manually close the process. Coverlet is working fine.

The project is in dot net 5.0.

Coverlet output Calculating coverage result… Generating report ‘ERP.Service.xUnit.Test\coverage.json’ ±------------------------------±-------±-------±-------+ | Module | Line | Branch | Method | ±------------------------------±-------±-------±-------+ | ERP.Core | 38.81% | 3.19% | 19.8% | ±------------------------------±-------±-------±-------+ | ERP.Infrastructure | 0% | 0% | 0% | ±------------------------------±-------±-------±-------+ | ERP.Repositories | 20.28% | 24.1% | 34.23% | ±------------------------------±-------±-------±-------+ | ERP.Services | 38.02% | 23.25% | 32.46% | ±----------------------------±-------±-------±-------+ | ERP.Services.xUnit.Test | 99.82% | 90.62% | 99% | ±------------------------------±-------±-------±-------+

±--------±-------±-------±-------+ | | Line | Branch | Method | ±--------±-------±-------±-------+ | Total | 0.1% | 20.65% | 19.06% | ±--------±-------±-------±-------+ | Average | 39.38% | 28.23% | 37.09% | ±--------±-------±-------±-------+

Output for dotnet test --collect:“XPlat Code Coverage”

Starting test execution, please wait… A total of 1 test files matched the specified pattern.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:33

github_iconTop GitHub Comments

1reaction
kastrophcommented, Nov 6, 2021

I definitely would not lose sleep over it unless you want a huge challenge. Software should not be designed this was in 2021!

I’m migrating the code to Clean Acrutature so everything should have its own service class exposed by an interface. Done 5k lines 95k more to go

1reaction
kastrophcommented, Nov 6, 2021

The web project is full of static references tends of thousands. If you build on an Intel i5 the build time is 30 minutes

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use code coverage for unit testing - .NET
This article discusses the usage of code coverage for unit testing with Coverlet and report generation using ReportGenerator. While this article ...
Read more >
dotnet test Coverlet wrong coverage
I'm builing a Jenkins pipeline using docker, sonarqube, coverlet. The results shown in Sonarqube are quite strange. See the image bellow, ...
Read more >
coverlet
Coverlet is integrated into the Visual Studio Test Platform as a data collector. To get coverage simply run the following command:.
Read more >
How to view code coverage with Coverlet and Visual ...
The first thing to do to add code coverage reports to our project is to install Coverlet, a NuGet package, whose documentation can...
Read more >
Measuring .NET Core Test Coverage with Coverlet
Measure your .NET Core Xunit Code Coverage and Generate HTML Reports! This article was posted July 30, 2019. I love working ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found