Skip to content

Migrate to Microsoft Testing Platform (MTP) & xUnit v3 #76

Description

@goh-chunlin

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

  1. Global Config: Update global.json to enable Microsoft.Testing.Platform as the default runner;
  2. Project Level:
    • Change OutputType to Exe because xUnit.net v3 test projects must be executable;
    • Enable UseMicrosoftTestingPlatformRunner property.
  3. Cleanup:
    • Remove xunit.runner.visualstudio and Microsoft.NET.Test.Sdk;
    • Upgrade to xunit.v3.

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions