Add TestInProgressMessages IPC for dotnet test active-test rendering#8652
Merged
Evangelink merged 2 commits intoMay 28, 2026
Merged
Conversation
Adds a new IPC message id 10 (`TestInProgressMessages`) emitted by `DotnetTestDataConsumer` whenever a `TestNodeUpdateMessage` reports `InProgressTestNodeStateProperty` for the non-IDE flow. Pairs with the SDK side in dotnet/sdk#54486 to render currently running tests in `dotnet test` output (dotnet/sdk#49712). The IDE path keeps emitting `TestResultMessages` (preserving existing behavior). Adds round-trip serializer tests. Back-compat: older SDKs ignore the unknown message id via TLV skip + `skipUnknownMessages`. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new dotnet-test IPC message (TestInProgressMessages, serializer id 10) in Microsoft.Testing.Platform so non-IDE consumers (notably dotnet test) can render “currently running tests” based on InProgressTestNodeStateProperty updates.
Changes:
- Introduces
TestInProgressMessages/TestInProgressMessageIPC models and TLV serializer (TestInProgressMessagesSerializer, id10). - Updates
DotnetTestDataConsumerto emitTestInProgressMessagesfor non-IDE in-progress updates (IDE path continues to useTestResultMessages). - Adds unit tests to validate round-trip serialization (including empty list handling) and registers the new serializer.
Show a summary per file
| File | Description |
|---|---|
| test/UnitTests/Microsoft.Testing.Platform.UnitTests/IPC/ProtocolTests.cs | Adds round-trip tests for TestInProgressMessages serialization (including empty list). |
| src/Platform/Microsoft.Testing.Platform/ServerMode/DotnetTest/IPC/Serializers/TestInProgressMessagesSerializer.cs | Implements TLV serialization/deserialization for the new in-progress IPC message. |
| src/Platform/Microsoft.Testing.Platform/ServerMode/DotnetTest/IPC/ObjectFieldIds.cs | Adds field IDs and assigns serializer message id 10 for TestInProgressMessages. |
| src/Platform/Microsoft.Testing.Platform/ServerMode/DotnetTest/IPC/Models/TestInProgressMessages.cs | Adds new IPC model records for in-progress test updates. |
| src/Platform/Microsoft.Testing.Platform/ServerMode/DotnetTest/IPC/DotnetTestDataConsumer.cs | Sends TestInProgressMessages for non-IDE InProgress updates to support active-test rendering. |
| src/Platform/Microsoft.Testing.Platform/IPC/Serializers/RegisterSerializers.cs | Registers the new serializer and updates the documented serializer id list. |
Copilot's findings
- Files reviewed: 6/6 changed files
- Comments generated: 1
Comment on lines
15
to
19
| @@ -19,6 +19,7 @@ namespace Microsoft.Testing.Platform.IPC.Serializers; | |||
| * FileArtifactMessageSerializer: 7 | |||
Drop stale ModuleSerializer entry (id 4 was previously removed) and rename DiscoveredTestMessage/TestResultMessage/FileArtifactMessage serializer entries to the actual plural type names. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Adds a new IPC message (id 10 -
TestInProgressMessages) and wires upDotnetTestDataConsumerto forwardTestNodeUpdateMessageevents carryingInProgressTestNodeStatePropertyto non-IDE callers. Pairs with dotnet/sdk#54486 to render currently running tests indotnet testoutput for MTP (dotnet/sdk#49712).What changes
TestInProgressMessages { ExecutionId, InstanceId, TestInProgressMessage[] }where each entry is{ Uid, DisplayName }.TestInProgressMessagesSerializer(TLV) registered with id10in the shared serializer table.DotnetTestDataConsumerpreviously only forwardedInProgressupdates when running under an IDE (wrapped asTestResultMessages). It now also emitsTestInProgressMessageson the non-IDE path sodotnet testcan render the "currently running tests" panel.Back-compat
This is additive: a newer MTP talking to an older SDK is safe - the SDK uses
NamedPipeServer skipUnknownMessages: trueand a TLV format where unknown field/message ids skip their payload, so older consumers silently ignore message id 10. Symmetrically, an older MTP with a newer SDK simply never sends the new message and the active-tests panel stays empty (existing behavior).Related
dotnet testwith MTP dotnet/sdk#49712