Coverlet freezes test execution
See original GitHub issueI 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:
- Created 4 years ago
- Comments:10
Top GitHub Comments
ok thanks for quick response, have a nice day and stay safe!
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