Context

xUnit v2 and VSTest are in maintenance. xUnit v3 test projects are executables on Microsoft.Testing.Platform (MTP): they start faster, run without an adapter, and support cancellation through TestContext.Current.CancellationToken.

Decision

The toolkit’s tests and Testing.* kits use xUnit v3 on MTP, and the boilerplate’s global.json selects the MTP runner for dotnet test. Anarchy’s test targets detect each project’s platform and run it with its own runner.

Consequences

  • The kits require xUnit v3 (and Moq 4.21 or later, AwesomeAssertions).
  • With the MTP runner set in global.json, dotnet test only runs MTP projects.
  • Analyzers such as xUnit1051 apply under warnings as errors.

Alternatives considered

  • xUnit v2 on VSTest. No new platform to learn, but no future features and a deprecated runner.