Uh oh!
There was an error while loading. Please reload this page.
Use client statefulness for design mode - #10886
Open
Amaury Levé (Evangelink) wants to merge 6 commits into
Open
Conversation
Expose a client-declared statefulness capability so test frameworks can
distinguish a stateful client (persists an addressable set of test nodes
and their last-known state, e.g. an IDE test explorer) from a stateless
client (streams updates, e.g. dotnet test).
- Add experimental IClientCapabilities { IsStateful } surfaced via
IClientInfo.Capabilities, mirroring the wire protocol's
clientInfo/capabilities split.
- Wire isStateful through the server-mode initialize handshake under
capabilities.testing, backward-compatible (absent => stateless).
- Default stateless in console host; build from client capabilities in
server host.
- Document the isStateful client capability in the protocol intro.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>…ful tests - Declare new internal symbols (JsonRpcStrings.IsStateful, ClientCapabilities/ ClientCapabilitiesService/ClientInfoService members) in InternalAPI.Unshipped.txt to satisfy the newly-added InternalAPI tracking analyzer (RS0051) that broke the Linux CI build after merging main. - Restore the required UTF-8 BOM (charset=utf-8-bom) on the new and edited .cs files. - Add unit tests covering both deserializer paths (System.Text.Json and Jsonite) for isStateful: true and the absent (stateless) default. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The ClientCapabilities and ClientInfoService record constructors (and their Deconstruct methods) changed signature, removing the old ones that are declared in InternalAPI.Shipped.txt. Declare them as *REMOVED* in InternalAPI.Unshipped.txt so the Public/Internal API analyzer (RS0017) does not fail the Arcade -warnaserror build. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 65c2403c-e84d-461f-8e13-3224f4445d11
Honor the client-declared capability in MSTest and the VSTest bridge while retaining the Visual Studio identity fallback for older clients. Clarify that statefulness is independent of multi-request support and cover the protocol-to-framework flow. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 65c2403c-e84d-461f-8e13-3224f4445d11
Contributor
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: None
What changed in this PR
Uses client-declared statefulness to determine VSTest/MSTest design mode while preserving compatibility with older Visual Studio clients.
Changes:
- Derives
DesignModefromIsStatefulwith the Visual Studio fallback. - Clarifies statefulness semantics in API and protocol documentation.
- Adds serialization, server propagation, adapter, and validation tests.
| File | Description |
|---|---|
test/UnitTests/MSTestAdapter.UnitTests/MSTestRunSettingsTests.cs | Tests MSTest design-mode behavior. |
test/UnitTests/Microsoft.Testing.Platform.UnitTests/ServerMode/ServerTests.cs | Verifies server propagation of statefulness. |
test/UnitTests/Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests/MtpServerClientTests.cs | Verifies client capability serialization. |
test/UnitTests/Microsoft.Testing.Extensions.VSTestBridge.UnitTests/ObjectModel/RunSettingsPatcherTests.cs | Tests VSTest bridge design mode. |
test/UnitTests/Microsoft.Testing.Extensions.VSTestBridge.UnitTests/CommandLine/RunSettingsCommandLineOptionsProviderTests.cs | Adds non-browser runsettings validation coverage. |
src/Platform/Microsoft.Testing.Platform/Services/IClientCapabilities.cs | Clarifies statefulness semantics. |
src/Platform/Microsoft.Testing.Platform.ServerMode.Client.Sources/Client/MtpServerClientOptions.cs | Corrects client option documentation. |
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/ObjectModel/RunSettingsPatcher.cs | Uses statefulness for VSTest design mode. |
src/Adapter/MSTest.TestAdapter/TestingPlatformAdapter/MSTestRunSettings.cs | Uses statefulness for MSTest design mode. |
docs/mstest-runner-protocol/001-protocol-intro.md | Clarifies protocol capability independence. |
docs/Changelog-Platform.md | Corrects the capability description. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Petr Pokorny (0101)
approved these changes
Aug 31, 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 freeto 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
IClientInfo.Capabilities.IsStatefulto set VSTest/MSTestDesignModeVisual Studio Test Explorer is being updated separately to declare itself as a stateful MTP client.
Related to #6494 and follows #9789.