Skip to content

Add TestInProgressMessages IPC for dotnet test active-test rendering#8652

Merged
Evangelink merged 2 commits into
microsoft:mainfrom
Evangelink:dev/amauryleve/in-progress-ipc
May 28, 2026
Merged

Add TestInProgressMessages IPC for dotnet test active-test rendering#8652
Evangelink merged 2 commits into
microsoft:mainfrom
Evangelink:dev/amauryleve/in-progress-ipc

Conversation

@Evangelink
Copy link
Copy Markdown
Member

Adds a new IPC message (id 10 - TestInProgressMessages) and wires up DotnetTestDataConsumer to forward TestNodeUpdateMessage events carrying InProgressTestNodeStateProperty to non-IDE callers. Pairs with dotnet/sdk#54486 to render currently running tests in dotnet test output for MTP (dotnet/sdk#49712).

What changes

  • New model TestInProgressMessages { ExecutionId, InstanceId, TestInProgressMessage[] } where each entry is { Uid, DisplayName }.
  • New TestInProgressMessagesSerializer (TLV) registered with id 10 in the shared serializer table.
  • DotnetTestDataConsumer previously only forwarded InProgress updates when running under an IDE (wrapped as TestResultMessages). It now also emits TestInProgressMessages on the non-IDE path so dotnet test can render the "currently running tests" panel.
  • Round-trip serializer tests.

Back-compat

This is additive: a newer MTP talking to an older SDK is safe - the SDK uses NamedPipeServer skipUnknownMessages: true and 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

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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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/TestInProgressMessage IPC models and TLV serializer (TestInProgressMessagesSerializer, id 10).
  • Updates DotnetTestDataConsumer to emit TestInProgressMessages for non-IDE in-progress updates (IDE path continues to use TestResultMessages).
  • 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>
@Evangelink Evangelink merged commit 0e348e8 into microsoft:main May 28, 2026
23 checks passed
@Evangelink Evangelink deleted the dev/amauryleve/in-progress-ipc branch May 28, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants