Other

Microsoft.Testing.Platform: How .NET test execution changed

DEV Community: #dotnet Gunjit Chhatwal
Other

Microsoft.Testing.Platform replaces VSTest with a model where the test project is an executable application rather than an externally loaded library. .NET 10's dotnet test integration, extension-based reporting and per-test retries simplify CI pipelines for teams using MSTest, NUnit, xUnit.net or TUnit.

Key points

  • MTP builds the test project as an executable, runnable via dotnet test, dotnet run or the produced binary.
  • Runner and extensions are registered at build time, cutting reflection-based discovery at run time.
  • MSTest.Sdk bundles the framework, runner and a default extension profile in a single project file.
  • In .NET 10 the test.runner setting in global.json enables native MTP orchestration.
  • CLI options become app-owned capabilities such as --report-trx, --coverage and --coverage-output-format.
  • Microsoft.Testing.Extensions.Retry adds --retry-failed-tests and --retry-failed-tests-max-percentage.
  • An app that runs zero tests exits non-zero under MTP, while VSTest usually treated it as success.

Real-world use

  • Teams running tests inside containers or locked-down build agents without installing an external runner
  • Projects targeting Native AOT and trimming that need to execute the test artifact directly
  • Long integration pipelines against a deployed service where only failed tests should be retried
  • Enterprises trying to remove behavioural differences between local IDE and CI test execution

This summary was generated by the agent from the original post on DEV Community: #dotnet. The full text and all rights belong to its author and publisher. Go to original

Report this story

Is something wrong with the summary, or do you own this content? Your message comes straight to my inbox.

Type of message

Related stories

Feedback

Found a bug or have an idea? Your message lands straight in my inbox.

Type of message