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.

Coverlet freezes test execution

See original GitHub issue

I have a Testset of around 10’000 Tests which I execute with the following command:

dotnet test ASK.UnitTests.sln --configuration Debug --no-build --no-build -l "console;verbosity=normal" -a C:\Users\padruttn\Documents\git\ask\packages\xunit.runner.visualstudio.2.4.1\build\_common

Now I wanted to add code coverage to that so I modified the command to the following:

dotnet test ASK.UnitTests.sln --configuration Debug --no-build --no-build -l "console;verbosity=normal" -a C:\Users\padruttn\Documents\git\ask\packages\xunit.runner.visualstudio.2.4.1\build\_common /p:CollectCoverage=true /p:CoverletOutputFormat=opencover

With that the test execution grinds to a halt after a couple of hundert tests and doesn’t make any move (I wated on the build server for 2h+ and it didn’t recover). When I set “CollectCoverage” to false all tests run through again. At one point I was able to reproduce the issue locally. When I tried to cancel the run I got this warning which might be related: warning MSB4220: Waiting for the currently executing task "Coverlet.MSbuild.Tasks.InstrumentationTask" to cancel. That Warning is just repeated all 10 seconds again. I only waited 5 minutes till I went on killing the .net core host, but it didn’t seem to stop soon. Any idea why that is and how I can fix that?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
MarcoRossignolicommented, Mar 19, 2020

ok thanks for quick response, have a nice day and stay safe!

1reaction
NPadruttcommented, Mar 19, 2020

It wasn’t a particular test. I had to exclude the DataAccess Project for coverage. Although I do not execute the DataAccess tests, it seems that other tests would try to cover the project. Once I excluded that one the coverage is running properly (although now with the thing in issue #347 ^^)

This is my new command: dotnet test ASK.UnitTests.sln /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:SingleHit=true /p:Exclude="[*ASKDataAccess*]*" --no-build

Read more comments on GitHub >

github_iconTop Results From Across the Web

coverlet/Documentation/KnownIssues.md at master
Known Issues. VSTest stops process execution early. Affected drivers: msbuild ( dotnet test ) , dotnet tool(if you're using --targetargs "test .
Read more >
Coverlet tool for test coverage, pipeline crashed - SonarQube
Hello, SonarQube 9.8 deployed from zip Pipeline crashes with an error Job failed: exit code 1 and null result.
Read more >
Some unit tests runs indefinitely
In a solution, I have 600 unit tests splitted in various libraries, and 450 of them are present in a single library. When...
Read more >
Howto resolve .net test hangs on "Starting test execution ...
I am trying to execute dotnet test from the command line on our Jenkins build server, but it just hangs on: Starting test...
Read more >
Documentation - GitHub
This datacollector is responsible for calling into Coverlet APIs for instrumenting dlls, collecting coverage results and sending the coverage output file back ...
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