From 47f56859ecd448f9b1aac1bba61ceaa42be5b729 Mon Sep 17 00:00:00 2001 From: Brad Wilson Date: Fri, 14 Jun 2024 14:23:18 -0700 Subject: [PATCH] Fix incorrect fully qualified name being passed to VSTest --- src/xunit.runner.visualstudio/Sinks/VsDiscoverySink.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xunit.runner.visualstudio/Sinks/VsDiscoverySink.cs b/src/xunit.runner.visualstudio/Sinks/VsDiscoverySink.cs index 3369e1c..5cd58bd 100644 --- a/src/xunit.runner.visualstudio/Sinks/VsDiscoverySink.cs +++ b/src/xunit.runner.visualstudio/Sinks/VsDiscoverySink.cs @@ -80,7 +80,8 @@ public void Dispose() try { - var result = new TestCase(testCase.TestClassNameWithNamespace, uri, source) { DisplayName = Escape(testCase.TestCaseDisplayName) }; + var fqTestMethodName = $"{testCase.TestClassNameWithNamespace}.{testCase.TestMethodName}"; + var result = new TestCase(fqTestMethodName, uri, source) { DisplayName = Escape(testCase.TestCaseDisplayName) }; result.SetPropertyValue(VsTestRunner.TestCaseUniqueIDProperty, testCase.TestCaseUniqueID); if (testPlatformContext.DesignMode)