From 6c121f8fed9bef903a235de7987363cc8b212a4d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 21 Aug 2025 08:47:01 +0000 Subject: [PATCH 1/3] Initial plan From 2d1fe5f86f0316e33549dcd1b759b610bc0cde68 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 21 Aug 2025 09:14:46 +0000 Subject: [PATCH 2/3] Fix test discovery regression: ensure all tests including explicit ones are returned for IDE discovery Co-authored-by: thomhurst <30480171+thomhurst@users.noreply.github.com> --- TUnit.Engine/TestDiscoveryService.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/TUnit.Engine/TestDiscoveryService.cs b/TUnit.Engine/TestDiscoveryService.cs index 6dcfac2c56..0116d23a3d 100644 --- a/TUnit.Engine/TestDiscoveryService.cs +++ b/TUnit.Engine/TestDiscoveryService.cs @@ -102,7 +102,17 @@ public async Task DiscoverTests(string testSessionId, ITest // For discovery requests (IDE test explorers), return all tests including explicit ones // For execution requests, apply filtering to exclude explicit tests unless explicitly targeted - var filteredTests = isForExecution ? _testFilterService.FilterTests(filter, tests) : tests; + IReadOnlyCollection filteredTests; + if (isForExecution) + { + // Apply filtering for execution + filteredTests = _testFilterService.FilterTests(filter, tests); + } + else + { + // Return all tests for discovery - no filtering should be applied + filteredTests = tests; + } // If we applied filtering, find all dependencies of filtered tests and add them if (isForExecution) From f7e069988c97d22692dffc60b0e3ff35625bd5a9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 21 Aug 2025 10:42:19 +0000 Subject: [PATCH 3/3] Revert unnecessary change: original ternary logic was already correct Co-authored-by: thomhurst <30480171+thomhurst@users.noreply.github.com> --- TUnit.Engine/TestDiscoveryService.cs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/TUnit.Engine/TestDiscoveryService.cs b/TUnit.Engine/TestDiscoveryService.cs index 0116d23a3d..6dcfac2c56 100644 --- a/TUnit.Engine/TestDiscoveryService.cs +++ b/TUnit.Engine/TestDiscoveryService.cs @@ -102,17 +102,7 @@ public async Task DiscoverTests(string testSessionId, ITest // For discovery requests (IDE test explorers), return all tests including explicit ones // For execution requests, apply filtering to exclude explicit tests unless explicitly targeted - IReadOnlyCollection filteredTests; - if (isForExecution) - { - // Apply filtering for execution - filteredTests = _testFilterService.FilterTests(filter, tests); - } - else - { - // Return all tests for discovery - no filtering should be applied - filteredTests = tests; - } + var filteredTests = isForExecution ? _testFilterService.FilterTests(filter, tests) : tests; // If we applied filtering, find all dependencies of filtered tests and add them if (isForExecution)