From 80bc393afccc5aeaeafc903e2b9dcbbb3129e782 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 8 Jan 2026 12:31:55 +0000 Subject: [PATCH 1/2] Initial plan From e6e257aeec3ac1f94a274e9807e4d2b32d84b0cc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 8 Jan 2026 12:49:24 +0000 Subject: [PATCH 2/2] Fix OverrideResult to reflect skip reason when Skipped is set When OverrideResult is called with TestState.Skipped and a reason, the reason was not being reflected in test output. The code was only checking test.Context.SkipReason but not the OverrideReason from the overridden result. Updated TestCoordinator to check OverrideReason when the result is overridden to Skipped. Co-authored-by: thomhurst <30480171+thomhurst@users.noreply.github.com> --- TUnit.Engine/Services/TestExecution/TestCoordinator.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/TUnit.Engine/Services/TestExecution/TestCoordinator.cs b/TUnit.Engine/Services/TestExecution/TestCoordinator.cs index 8d3797392e..a2efc9e7e0 100644 --- a/TUnit.Engine/Services/TestExecution/TestCoordinator.cs +++ b/TUnit.Engine/Services/TestExecution/TestCoordinator.cs @@ -276,7 +276,10 @@ await _eventReceiverOrchestrator.InvokeLastTestInSessionEventReceiversAsync( await _messageBus.Failed(test.Context, test.Context.Execution.Result?.Exception!, test.StartTime.GetValueOrDefault()).ConfigureAwait(false); break; case TestState.Skipped: - await _messageBus.Skipped(test.Context, test.Context.SkipReason ?? "Skipped").ConfigureAwait(false); + var skipReason = test.Context.SkipReason + ?? (test.Context.Execution.Result?.IsOverridden == true ? test.Context.Execution.Result.OverrideReason : null) + ?? "Skipped"; + await _messageBus.Skipped(test.Context, skipReason).ConfigureAwait(false); break; case TestState.Cancelled: await _messageBus.Cancelled(test.Context, test.StartTime.GetValueOrDefault()).ConfigureAwait(false);