Executive Summary
The current test infrastructure relies on the legacy vstest engine, which introduces significant process overhead and dependency bloat. This task migrates the test suite to the modern Microsoft Testing Platform (MTP) and xUnit v3, aligning with .NET 10 standards.
Technical Rationale (The "Why")
- Performance: Transitions from a "Host-Adapter-Runner" process model to a "Self-Contained Executable" model. This significantly reduces the "Time-to-First-Test";
- Dependency Reduction: Eliminates legacy packages such as
xunit.runner.visualstudio, reducing the attack surface and potential for version conflicts;
- Future Proofing: Aligns with the .NET 10 SDK orchestration via
global.json, ensuring the repository uses the latest first-class testing infrastructure.
Changes Proposed
- Global Config: Update
global.json to enable Microsoft.Testing.Platform as the default runner;
- Project Level:
- Change
OutputType to Exe because xUnit.net v3 test projects must be executable;
- Enable
UseMicrosoftTestingPlatformRunner property.
- Cleanup:
- Remove
xunit.runner.visualstudio and Microsoft.NET.Test.Sdk;
- Upgrade to
xunit.v3.
References
Executive Summary
The current test infrastructure relies on the legacy
vstestengine, which introduces significant process overhead and dependency bloat. This task migrates the test suite to the modern Microsoft Testing Platform (MTP) and xUnit v3, aligning with .NET 10 standards.Technical Rationale (The "Why")
xunit.runner.visualstudio, reducing the attack surface and potential for version conflicts;global.json, ensuring the repository uses the latest first-class testing infrastructure.Changes Proposed
global.jsonto enableMicrosoft.Testing.Platformas the default runner;OutputTypetoExebecause xUnit.net v3 test projects must be executable;UseMicrosoftTestingPlatformRunnerproperty.xunit.runner.visualstudioandMicrosoft.NET.Test.Sdk;xunit.v3.References