Skip to content

Refactor TestNodeProperties.cs into focused single-responsibility files - #7940

Merged
Evangelink merged 2 commits into
mainfrom
copilot/refactor-test-node-properties
Apr 30, 2026
Merged

Refactor TestNodeProperties.cs into focused single-responsibility files#7940
Evangelink merged 2 commits into
mainfrom
copilot/refactor-test-node-properties

Conversation

Copilot AI commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

TestNodeProperties.cs had grown to 1295 lines, making navigation and per-type Git history impractical. Split it into 9 focused files with no logic changes.

File splits

New file Contents
IProperty.cs IProperty interface
TestNodeStateProperties.cs All 9 state property classes (Discovered, InProgress, Passed, Skipped, Failed, Error, Timeout, Cancelled, base)
TimingProperties.cs TimingInfo, StepTimingInfo, TimingProperty
FileLocationProperties.cs LinePosition, LinePositionSpan, FileLocationProperty, TestFileLocationProperty
TestMethodIdentifierProperty.cs TestMethodIdentifierProperty
TestMetadataProperty.cs TestMetadataProperty
OutputProperties.cs StandardOutputProperty, StandardErrorProperty
FileArtifactProperty.cs FileArtifactProperty
SerializableKeyValuePairStringProperty.cs SerializableKeyValuePairStringProperty (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").

Copilot AI requested review from Copilot and removed request for Copilot April 29, 2026 22:15
Copilot AI linked an issue Apr 29, 2026 that may be closed by this pull request
5 tasks
Copilot AI requested review from Copilot and removed request for Copilot April 29, 2026 22:25
Copilot AI changed the title [WIP] Refactor TestNodeProperties.cs into smaller focused files Refactor TestNodeProperties.cs into focused single-responsibility files Apr 29, 2026
Copilot AI requested a review from Evangelink April 29, 2026 22:25
@Evangelink
Evangelink marked this pull request as ready for review April 30, 2026 07:18
Copilot AI review requested due to automatic review settings April 30, 2026 07:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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
Evangelink merged commit 880839d into main Apr 30, 2026
45 of 57 checks passed
@Evangelink
Evangelink deleted the copilot/refactor-test-node-properties branch April 30, 2026 09:28
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>
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.

Refactor TestNodeProperties.cs (1295 lines) into focused files

3 participants