From f044188b287a1864d518fd64a184e0427e6ff0d3 Mon Sep 17 00:00:00 2001 From: Tom Longhurst <30480171+thomhurst@users.noreply.github.com> Date: Mon, 12 Jan 2026 19:03:41 +0000 Subject: [PATCH] feat: add class name to GitHub Reporter test output Fixes #4323 - The GitHub Reporter now displays the class name alongside the method name in the Test column of the Details table, making it easier to identify which specific test is being referenced. Co-Authored-By: Claude Opus 4.5 --- TUnit.Engine/Reporters/GitHubReporter.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/TUnit.Engine/Reporters/GitHubReporter.cs b/TUnit.Engine/Reporters/GitHubReporter.cs index f7c37ef5c0..96851dd679 100644 --- a/TUnit.Engine/Reporters/GitHubReporter.cs +++ b/TUnit.Engine/Reporters/GitHubReporter.cs @@ -178,7 +178,13 @@ public Task AfterRunAsync(int exitCode, CancellationToken cancellation) foreach (var testNodeUpdateMessage in last.Values) { - var name = testNodeUpdateMessage.TestNode.DisplayName; + var testMethodIdentifier = testNodeUpdateMessage.TestNode.Properties.AsEnumerable() + .OfType() + .FirstOrDefault(); + + var className = testMethodIdentifier?.TypeName; + var displayName = testNodeUpdateMessage.TestNode.DisplayName; + var name = string.IsNullOrEmpty(className) ? displayName : $"{className}.{displayName}"; var passedProperty = testNodeUpdateMessage.TestNode.Properties.OfType().FirstOrDefault();