-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dotnet test should fail when it can't find any tests #2590
Comments
Issue moved from dotnet/sdk#13942
From @omajid on Thursday, October 1, 2020 7:26:13 PM |
Issue moved from dotnet/sdk#13942
From @omajid on Thursday, October 1, 2020 7:32:41 PM We ran into this issue during a previous release too: #2079. This also had the bug that |
Issue moved from dotnet/sdk#13942
From @tmds on Friday, October 2, 2020 7:22:20 AM A zero exit code MUST mean success for I feel like clicking the ':+1:'-button a hundred times. |
That doesn't solve the original problem, does it? |
Issue moved from dotnet/sdk#13942
From @omajid on Thursday, October 1, 2020 7:26:04 PM
At various times,
dotnet test
seems to run into an issue where it can't identify any tests. When that happens,dotnet test
exits with a 0 exit code. Everything interprets 0 as success. That tells the user (and any automated systems) that everything is working, even though no tests were found which should actually be an error.This happened in .NET 5 Preview 8:
I tried migrating to .NET 5 Preview 8and all my tests "passed", because the tests couldn't be found at all.
Would it be possible to make
dotnet test
fail with an non-zero exit code when tests can't be found? This makes it easier for developers to catch issues in their CI instead of incorrectly assuming that all tests are passing. When I see that tests fail, I can take steps to find the error and apply the workarounds.The text was updated successfully, but these errors were encountered: