Refactor TestNodeProperties.cs into focused single-responsibility files - #7940
Merged
Conversation
5 tasks
Agent-Logs-Url: https://github.com/microsoft/testfx/sessions/bc1cf224-cea4-4c50-a498-444ff77ce006 Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor TestNodeProperties.cs into smaller focused files
Refactor Apr 29, 2026
TestNodeProperties.cs into focused single-responsibility files
Evangelink
marked this pull request as ready for review
April 30, 2026 07:18
Evangelink
approved these changes
Apr 30, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors the Microsoft.Testing.Platform message property types by splitting the former monolithic TestNodeProperties.cs into multiple focused, single-responsibility files while keeping namespaces and public APIs stable.
Changes:
- Split
TestNodeProperties.cs(~1295 LOC) into 9 focused files (state, timing, file locations, metadata, output, artifacts, etc.). - Preserved existing types and namespaces (
Microsoft.Testing.Platform.Extensions.Messages) to avoid API surface/namespace changes. - Fixed two pre-existing XML doc comment typos during the move.
Show a summary per file
| File | Description |
|---|---|
| src/Platform/Microsoft.Testing.Platform/Messages/TestNodeProperties.cs | Removed the monolithic file after extracting its types into focused files. |
| src/Platform/Microsoft.Testing.Platform/Messages/IProperty.cs | Hosts IProperty interface in its own file. |
| src/Platform/Microsoft.Testing.Platform/Messages/TestNodeStateProperties.cs | Hosts the base state property and the concrete test node state property types. |
| src/Platform/Microsoft.Testing.Platform/Messages/TimingProperties.cs | Hosts timing-related types (TimingInfo, StepTimingInfo, TimingProperty). |
| src/Platform/Microsoft.Testing.Platform/Messages/FileLocationProperties.cs | Hosts file/line location-related types (LinePosition*, FileLocationProperty, TestFileLocationProperty). |
| src/Platform/Microsoft.Testing.Platform/Messages/TestMethodIdentifierProperty.cs | Hosts TestMethodIdentifierProperty. |
| src/Platform/Microsoft.Testing.Platform/Messages/TestMetadataProperty.cs | Hosts TestMetadataProperty. |
| src/Platform/Microsoft.Testing.Platform/Messages/OutputProperties.cs | Hosts StandardOutputProperty and StandardErrorProperty. |
| src/Platform/Microsoft.Testing.Platform/Messages/FileArtifactProperty.cs | Hosts FileArtifactProperty. |
| src/Platform/Microsoft.Testing.Platform/Messages/SerializableKeyValuePairStringProperty.cs | Hosts the internal SerializableKeyValuePairStringProperty. |
Copilot's findings
- Files reviewed: 10/10 changed files
- Comments generated: 0
Evangelink
approved these changes
Apr 30, 2026
This was referenced Apr 30, 2026
Evangelink
added a commit
that referenced
this pull request
May 12, 2026
…iles (#7940) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Evangelink <11340282+Evangelink@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.
TestNodeProperties.cshad grown to 1295 lines, making navigation and per-type Git history impractical. Split it into 9 focused files with no logic changes.File splits
IProperty.csIPropertyinterfaceTestNodeStateProperties.csDiscovered,InProgress,Passed,Skipped,Failed,Error,Timeout,Cancelled, base)TimingProperties.csTimingInfo,StepTimingInfo,TimingPropertyFileLocationProperties.csLinePosition,LinePositionSpan,FileLocationProperty,TestFileLocationPropertyTestMethodIdentifierProperty.csTestMethodIdentifierPropertyTestMetadataProperty.csTestMetadataPropertyOutputProperties.csStandardOutputProperty,StandardErrorPropertyFileArtifactProperty.csFileArtifactPropertySerializableKeyValuePairStringProperty.csSerializableKeyValuePairStringProperty(internal)All types remain in
Microsoft.Testing.Platform.Extensions.Messages— no namespace or API surface changes. Also fixed two pre-existing doc comment typos ("Gets get the timeout…"→"Gets the timeout…","Timespan"→"TimeSpan").