RFC 020: Add composable test execution filter providers - #10235
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: d7adc271-ccc0-4654-aede-93ac7d83dd40
Contributor
There was a problem hiding this comment.
Pull request overview
Adds RFC 020 and experimental infrastructure for composing independent test execution constraints in Microsoft.Testing.Platform.
Changes:
- Adds filter-provider registration, request context, AND composition, and UID intersection.
- Updates MSTest and VSTestBridge filter translation and empty-selection behavior.
- Adds unit/acceptance coverage, API tracking, diagnostics, and localization resources.
Show a summary per file
| File | Description |
|---|---|
test/UnitTests/MSTestAdapter.UnitTests/MSTestFilterContextTests.cs |
Tests MSTest filter translation. |
test/UnitTests/Microsoft.Testing.Platform.UnitTests/ServerMode/ServerTests.cs |
Tests empty server selections. |
test/UnitTests/Microsoft.Testing.Platform.UnitTests/Requests/TestExecutionFilterComposerTests.cs |
Tests composition and provider lifecycle. |
test/UnitTests/Microsoft.Testing.Extensions.VSTestBridge.UnitTests/ObjectModel/RunContextAdapterFilterTests.cs |
Tests bridge filter translation. |
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ExecutionTests.cs |
Adds end-to-end provider scenarios. |
src/Platform/Microsoft.Testing.Platform/TestHost/TestHostManager.cs |
Registers and builds providers. |
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hant.xlf |
Adds localized resource entries. |
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hans.xlf |
Adds localized resource entries. |
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.tr.xlf |
Adds localized resource entries. |
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ru.xlf |
Adds localized resource entries. |
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pt-BR.xlf |
Adds localized resource entries. |
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pl.xlf |
Adds localized resource entries. |
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ko.xlf |
Adds localized resource entries. |
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ja.xlf |
Adds localized resource entries. |
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.it.xlf |
Adds localized resource entries. |
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.fr.xlf |
Adds localized resource entries. |
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.es.xlf |
Adds localized resource entries. |
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.de.xlf |
Adds localized resource entries. |
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.cs.xlf |
Adds localized resource entries. |
src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx |
Defines composition diagnostics. |
src/Platform/Microsoft.Testing.Platform/Requests/TestNodeUidListFilter.cs |
Documents empty-list semantics. |
src/Platform/Microsoft.Testing.Platform/Requests/TestHostTestFrameworkInvoker.cs |
Propagates request cancellation. |
src/Platform/Microsoft.Testing.Platform/Requests/TestExecutionRequestOrigin.cs |
Defines request origins. |
src/Platform/Microsoft.Testing.Platform/Requests/TestExecutionRequestKind.cs |
Defines request kinds. |
src/Platform/Microsoft.Testing.Platform/Requests/TestExecutionFilterOperator.cs |
Defines AND composition. |
src/Platform/Microsoft.Testing.Platform/Requests/TestExecutionFilterContext.cs |
Exposes provider request context. |
src/Platform/Microsoft.Testing.Platform/Requests/TestExecutionFilterComposer.cs |
Composes and normalizes constraints. |
src/Platform/Microsoft.Testing.Platform/Requests/ServerTestExecutionRequestFactory.cs |
Supports asynchronous request creation. |
src/Platform/Microsoft.Testing.Platform/Requests/ITestExecutionRequestFactory.cs |
Adds cancellation to request creation. |
src/Platform/Microsoft.Testing.Platform/Requests/ITestExecutionFilterProvider.cs |
Defines the provider API. |
src/Platform/Microsoft.Testing.Platform/Requests/ConsoleTestExecutionRequestFactory.cs |
Applies providers to console requests. |
src/Platform/Microsoft.Testing.Platform/Requests/CompositeTestExecutionFilter.cs |
Defines composite filters. |
src/Platform/Microsoft.Testing.Platform/PublicAPI/PublicAPI.Unshipped.txt |
Tracks new public APIs. |
src/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Unshipped.txt |
Tracks internal API changes. |
src/Platform/Microsoft.Testing.Platform/Hosts/TestHostBuilder.Modes.cs |
Adds providers to host services. |
src/Platform/Microsoft.Testing.Platform/Hosts/ServerTestHost.RequestExecution.cs |
Evaluates server-origin providers. |
src/Platform/Microsoft.Testing.Platform/Hosts/ConsoleTestHost.cs |
Supplies providers to request creation. |
src/Platform/Microsoft.Testing.Platform/Helpers/TestApplicationBuilderExtensions.cs |
Exposes provider registration. |
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/xlf/ExtensionResources.zh-Hant.xlf |
Adds localized bridge diagnostics. |
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/xlf/ExtensionResources.zh-Hans.xlf |
Adds localized bridge diagnostics. |
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/xlf/ExtensionResources.tr.xlf |
Adds localized bridge diagnostics. |
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/xlf/ExtensionResources.ru.xlf |
Adds localized bridge diagnostics. |
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/xlf/ExtensionResources.pt-BR.xlf |
Adds localized bridge diagnostics. |
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/xlf/ExtensionResources.pl.xlf |
Adds localized bridge diagnostics. |
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/xlf/ExtensionResources.ko.xlf |
Adds localized bridge diagnostics. |
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/xlf/ExtensionResources.ja.xlf |
Adds localized bridge diagnostics. |
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/xlf/ExtensionResources.it.xlf |
Adds localized bridge diagnostics. |
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/xlf/ExtensionResources.fr.xlf |
Adds localized bridge diagnostics. |
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/xlf/ExtensionResources.es.xlf |
Adds localized bridge diagnostics. |
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/xlf/ExtensionResources.de.xlf |
Adds localized bridge diagnostics. |
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/xlf/ExtensionResources.cs.xlf |
Adds localized bridge diagnostics. |
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/ExtensionResources.resx |
Defines bridge diagnostics. |
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/ObjectModel/ContextAdapterBase.cs |
Translates composite and empty filters. |
src/Adapter/MSTest.TestAdapter/TestingPlatformAdapter/MSTestFilterContext.cs |
Translates native MSTest filters. |
src/Adapter/MSTest.TestAdapter/Resources/xlf/PlatformAdapterResources.zh-Hant.xlf |
Adds localized adapter diagnostics. |
src/Adapter/MSTest.TestAdapter/Resources/xlf/PlatformAdapterResources.zh-Hans.xlf |
Adds localized adapter diagnostics. |
src/Adapter/MSTest.TestAdapter/Resources/xlf/PlatformAdapterResources.tr.xlf |
Adds localized adapter diagnostics. |
src/Adapter/MSTest.TestAdapter/Resources/xlf/PlatformAdapterResources.ru.xlf |
Adds localized adapter diagnostics. |
src/Adapter/MSTest.TestAdapter/Resources/xlf/PlatformAdapterResources.pt-BR.xlf |
Adds localized adapter diagnostics. |
src/Adapter/MSTest.TestAdapter/Resources/xlf/PlatformAdapterResources.pl.xlf |
Adds localized adapter diagnostics. |
src/Adapter/MSTest.TestAdapter/Resources/xlf/PlatformAdapterResources.ko.xlf |
Adds localized adapter diagnostics. |
src/Adapter/MSTest.TestAdapter/Resources/xlf/PlatformAdapterResources.ja.xlf |
Adds localized adapter diagnostics. |
src/Adapter/MSTest.TestAdapter/Resources/xlf/PlatformAdapterResources.it.xlf |
Adds localized adapter diagnostics. |
src/Adapter/MSTest.TestAdapter/Resources/xlf/PlatformAdapterResources.fr.xlf |
Adds localized adapter diagnostics. |
src/Adapter/MSTest.TestAdapter/Resources/xlf/PlatformAdapterResources.es.xlf |
Adds localized adapter diagnostics. |
src/Adapter/MSTest.TestAdapter/Resources/xlf/PlatformAdapterResources.de.xlf |
Adds localized adapter diagnostics. |
src/Adapter/MSTest.TestAdapter/Resources/xlf/PlatformAdapterResources.cs.xlf |
Adds localized adapter diagnostics. |
src/Adapter/MSTest.TestAdapter/Resources/PlatformAdapterResources.resx |
Defines adapter diagnostics. |
docs/RFCs/020-Test-Execution-Filter-Providers.md |
Documents the design and scope. |
Review details
- Files reviewed: 69/69 changed files
- Comments generated: 2
- Review effort level: Medium
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: d7adc271-ccc0-4654-aede-93ac7d83dd40
Contributor
There was a problem hiding this comment.
Review details
Comments suppressed due to low confidence (1)
src/Platform/Microsoft.Testing.Platform/Requests/TestExecutionFilterComposer.cs:20
- When no providers are enabled, this still normalizes and validates the request filter. That contradicts the RFC's compatibility guarantee that the same built-in filter object is preserved: UID filters are replaced/sorted/deduplicated, and a custom filter returned by the existing internal factory now throws. Short-circuiting preserves the pre-provider path while retaining composition whenever a provider is present.
- Files reviewed: 69/69 changed files
- Comments generated: 2
- Review effort level: Medium
This comment has been minimized.
This comment has been minimized.
Address PR review feedback:
- ComposeAsync now returns the built-in request filter instance
untouched when no enabled provider contributes a constraint, so
NopFilter/TestNodeUidListFilter are not rebuilt, UID order is not
changed, and a framework-specific request filter is no longer
rejected. This makes the RFC compatibility guarantee literally true.
- Document the short-circuit in the composition algorithm, examples,
and compatibility sections.
- Add the missing [Experimental("TPEXP")] attribute to the three enums
in the RFC public API listing so it matches the real declarations.
- State explicitly that this RFC does not resolve #3590 (custom filter
implementations), which stays open pending capability negotiation.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b9d32942-cfb3-453e-a488-7e6aed7c42fd
Contributor
🧪 Test quality grade — PR #10235
This advisory comment was generated automatically. Grades are heuristic
|
Evangelink
enabled auto-merge (squash)
July 28, 2026 07:36
0101
approved these changes
Jul 28, 2026
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
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.
Summary
Adds RFC 020 and its implementation in the same change:
ITestExecutionFilterProviderAPI with run/discovery kind, console/server origin, and request cancellation;CompositeTestExecutionFilterand normalizes UID-list constraints by intersection, including match-none empty intersections;TestNodeUidListFiltersemantics in both adapter paths and covers server empty selection.The provider API is scenario-neutral: providers contribute per-request constraints. Sharding, batching, retry, and other multi-run planning remain orchestrator responsibilities.
Motivation and issue coverage
Fixes #3530.
This does not close #3590. That issue asks for framework authors to be able to supply their own
ITestExecutionFilterimplementations, and this change still rejects custom filter types. It delivers the composable extension point plus the recursive validation that a future capability negotiation needs, but not custom-kind support. The RFC now states this explicitly inMotivation,Scope, andCustom filter types.This establishes common infrastructure relevant to #3528, #4068, and #7160 without implementing batching/sharding or a new cross-framework filter language. It documents why #4293 remains an adapter capability concern and explicitly rejects unsupported tree/custom filters instead of silently ignoring them.
This is orthogonal to draft #8820: that RFC proposes how a user-facing expression becomes a request filter; this PR defines how that built-in request filter composes with independent extension constraints. It does not add, rename, or claim any CLI option.
Compatibility
null/NopFilterfor a request, which is the expected server-origin path in this version.[Experimental("TPEXP")]with PublicAPI entries.().Validation
Microsoft.Testing.Platform.UnitTests: 1,673 passed.Microsoft.Testing.Extensions.VSTestBridge.UnitTests: 70 passed.MSTestAdapter.UnitTests: 61 passed.ExecutionTestspacked acceptance matrix: 51 passed across net462, net8.0, and net10.0.Two independent local review passes were completed. The first found internal API tracking gaps; those were fixed by replacing RS0051 suppressions with explicit shipped/unshipped API entries. The second found no additional issues.
Deferred work