-
Notifications
You must be signed in to change notification settings - Fork 325
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
Tests that are timing out are flagged as failed instead of timed out #4139
Comments
This is how it has behaved since MSTestV1. |
I'd be happy to. While I think the second option is more correct (no error message) and simpler to do, the first option that keeps the message but sets the right status is probably the least behavioral change as only the status and not the error message would change. |
After a closer look, I'm realizing that this would require a change in the Test ObjectModel, since it doesn't contain that enum: |
Adding @singhsarab to comment on any changes to the OM. |
Sorry, I missed this thread. There are a few reasons I am not very keen to take this
|
Well here's an alternative solution: |
Moved to vstest repository as we are limited by the enum provided by Test Platform Object Model as pointed out by @dotMorten. |
This is a new feature and won't be implemented, we are focusing on adding new features to Testing.Platform instead. https://aka.ms/testingplatform |
Description
When a test times out, there's no indication in the test report it timed out - it's showing as failed instead. There's quite a big difference between the two, as a timed out test is more of the inconclusive kind.
I believe this issue is occurring here:
https://github.com/Microsoft/testfx/blob/fa7f9a8ecb2fc01fd68745a467a977e0485d6320/src/Adapter/MSTest.CoreAdapter/Extensions/TestResultExtensions.cs#L24-L26
In line 24, the outcome is correctly reported as
Timeout
, but the following if-condition is finding the exception and then sets the error toFailed
.Alternatively the issue is that the TestFailureException shouldn't have been set in the first place, since that error message doesn't provide any sort of extra value anyway:
https://github.com/Microsoft/testfx/blob/fa7f9a8ecb2fc01fd68745a467a977e0485d6320/src/Adapter/MSTest.CoreAdapter/Execution/TestMethodInfo.cs#L704-L706
The text was updated successfully, but these errors were encountered: