Skip to content

Tests that are timing out are flagged as failed instead of timed out #4139

Closed as not planned
@dotMorten

Description

@dotMorten

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 to Failed.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions