✅ dotnet test doesn't show correct total number of unit tests at the end
I have a solution with many projects. When I run dotnet test, it selects all my xUnit projects and correctly executes all of them. I have 440 unit tests in total, but at the end, dotnet test outputs a number that is sometimes 428 sometimes 380 sometimes 440 (the correct number) etc ... I think it sometimes fails to aggregate all the test results. I find it hard to make a MRE to share because I tried on two computers, and I can only see the bug on one of them. On the other one, no matter how many times I run the command dotnet test, I get 440 which is the correct number. For the record, I use
--logger html but I don't think that has anything to do with the problem. What should I investigate? How can I get to the bottom of this? I already tried upgrading all my xUnit nugget packages.8 Replies
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
So I tried to make my project as small as possible
And to still have the bug
https://youtu.be/1Cyux7dAw5Y
I couldn't get it smaller than that to trigger the bug:
https://github.com/JasonMendoza2008/MREDotnetTest
I made sure that no tests in the MRE had the same method name if that's what you meant here?
I'm on xUnit 2.9.3 though
seems that xUnit.v3 is a different nuget package, is that correct?
What is the binlog file? I'll look into it but I've never heard of it
Unknown User•5w ago
Message Not Public
Sign In & Join Server To View
I know but if I remove any dependencies or project the bug disappears
I assume it has to do with multithreading problems when compiling and testing everything at the same time
Which is why it’s hard to make it smaller
Doing it rn
Unknown User•4w ago
Message Not Public
Sign In & Join Server To View
and when specifying 1 processor max, I don't have the issue
Unknown User•4w ago
Message Not Public
Sign In & Join Server To View
Still can reproduce the bug on v3, I just updated
Gonna make an issue
Thanks for the help!