dotnet presents a walkthrough of the new Microsoft.Testing.Platform for .NET, highlighting its advantages over VSTest and demonstrating integration with popular testing frameworks.

New dotnet test Experience with Microsoft.Testing.Platform

The .NET ecosystem is entering a new era in testing with the introduction of the Microsoft.Testing.Platform. Designed as a lightweight, modular alternative to VSTest, this platform delivers significant benefits for developers and teams:

Key Benefits

  • Faster test execution: Streamlines the running of your test suites for improved productivity.
  • Native AOT (Ahead-of-Time) support: Enables high-performance and low-overhead test runs, even for cloud-native and modern apps.
  • Self-contained test executables: Package your tests as standalone binaries that can run anywhere—ideal for distributed execution and CI/CD scenarios.
  • Greater flexibility: Supports a range of popular test frameworks including MSTest, NUnit, and xUnit without being tied down to a specific tool.

Supported Frameworks

  • MSTest
  • NUnit
  • xUnit

The platform lets you create and deploy tests that fit your project’s needs, whether you’re building modern web apps with ASP.NET Core or targeting multiple platforms with .NET MAUI.

Architecture Overview

Microsoft.Testing.Platform is modular, enabling you to:

  • Pick only the features and frameworks you require
  • Benefit from rapid setup and easy integration into existing projects
  • Package tests for flexibility in deployment (CI pipelines, containers, cloud environments)

Getting Started

  1. Integrate Microsoft.Testing.Platform in your test projects.
  2. Choose your preferred test framework (MSTest, NUnit, xUnit).
  3. Build and package tests as standalone executables for deployment anywhere.
  4. Take advantage of Native AOT capabilities for optimal performance.

Resources

Consider leveraging these new testing capabilities in your next .NET project to achieve faster, more reliable, and flexible testing workflows.