Skip to content

OverrideResult does not reflect the specified reason even when Skipped is set #4015

@neuecc

Description

@neuecc

I used OverrideResult to dynamically skip tests based on certain conditions.
The test was skipped as expected, but the reason was not reflected and just shows "Skipped".

Environment:

  • .NET 10.0.100
  • TUnit 1.5.6

Code:

[Test]
public async Task TestSkip()
{
    TestContext.Current!.Execution.OverrideResult(TestState.Skipped, "test-skip foo bar baz.");
}

Console:

Image

Visual Studio 2026 Test Explorer:

Image

(Sorry for the message of images in Japanese)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions