Skip to content

Conversation

thomhurst
Copy link
Contributor

@thomhurst thomhurst commented Oct 6, 2025

Fixes #3590

This pull request introduces a new extensible filtering system for test execution requests, improving both server and console modes. The changes replace previous hardcoded filter logic with a provider-based approach, add new experimental APIs for filter composition, and refactor the test node visitor to use the new unified filter interface.

Filtering System Refactor and Extensibility

  • Introduced new experimental interfaces and classes for extensible test execution filtering, including ITestExecutionFilter, ITestExecutionFilterFactory, IRequestFilterProvider, and AggregateTestExecutionFilter, allowing filters to be composed and provided per request. [1] [2] [3] [4] [5] [6]
  • Refactored server and console test host initialization to register filter providers and factories, enabling dynamic filter resolution based on request context. [1] [2]

Test Node Visitor Refactor

  • Updated BFSTestNodeVisitor to use the new ITestExecutionFilter.Matches(TestNode) method for filtering, removing path-based and filter-type-specific logic for a more unified approach. [1] [2] [3]
  • Removed legacy path encoding and filter matching code, simplifying traversal and expansion logic.

NopFilter and Other Filter Implementations

  • Refactored NopFilter to implement the new ITestExecutionFilter interface and always match any test node.

Server Request Handling

  • Changed server request execution to resolve filters via the new provider system, removing hardcoded filter selection logic and supporting more flexible request filtering.

These changes lay the foundation for more flexible and composable test execution filtering, making it easier to extend and customize filtering logic for different scenarios.

Copy link
Member

@Youssef1313 Youssef1313 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @thomhurst

I recall last time I discussed this with @Evangelink, we had concerns/doubts/questions about exposing filters for public extensibility, and we were unsure about how the final design shape should look like.

This will need more thinking and design work on our side.

@thomhurst
Copy link
Contributor Author

Thanks for the PR @thomhurst

I recall last time I discussed this with @Evangelink, we had concerns/doubts/questions about exposing filters for public extensibility, and we were unsure about how the final design shape should look like.

This will need more thinking and design work on our side.

Sure thing. Be good if we could get something agreed though - Been over a year since the issue was raised 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Testing Platform] Open up filters for custom implementations

2 participants