-
-
Notifications
You must be signed in to change notification settings - Fork 86
Fix explicit tests not being discovered by IDEs #2947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ering Co-authored-by: thomhurst <30480171+thomhurst@users.noreply.github.com>
Copilot finished work on behalf of
thomhurst
August 18, 2025 11:38
This was referenced Aug 20, 2025
This was referenced Aug 22, 2025
This was referenced Aug 31, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explicit tests marked with
[Explicit]
attribute were not being discovered by IDEs like Rider, making them invisible in test explorers and missing the green triangle indicators next to test methods. The issue occurred because the test discovery pipeline was filtering out explicit tests during the discovery phase.Root Cause:
The
TestDiscoveryService.DiscoverTests()
method was applying_testFilterService.FilterTests()
during discovery, which removed explicit tests from the results sent to IDEs. IDEs need to see ALL tests (including explicit ones) during discovery to display them in test explorers.Solution:
Separated discovery behavior from execution filtering by:
isForExecution
parameter toTestDiscoveryService.DiscoverTests()
isForExecution: false
): Return all tests including explicit onesisForExecution: true
): Apply normal filtering to exclude explicit tests unless explicitly targetedChanges:
TestDiscoveryService.cs
: Added overload withisForExecution
parameter to control filtering behaviorTestRequestHandler.cs
: Updated discovery requests to useisForExecution: false
and run requests to useisForExecution: true
Result:
The fix is minimal and surgical, maintaining backward compatibility while restoring the expected IDE experience.
Fixes #2946.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.