Skip to content

Latest commit

 

History

History

README.md

Microsoft Testing Platform Examples — xUnit v3, TUnit, MSTest, and .NET Test Runner

YouTube Blog Newsletter All Links LinkedIn

Explore the Microsoft Testing Platform (MTP) — the modern, lightweight replacement for VSTest — with practical examples across the most popular .NET test frameworks: xUnit v3, TUnit, MSTest, and legacy xUnit v2. Each project shows how to wire up the framework with MTP, run tests as standalone executables, and take advantage of the new extensibility model.

Watch the Videos

Microsoft Testing Platform CHANGES EVERYTHING for Your Tests!

Microsoft Testing Platform CHANGES EVERYTHING for Your Tests!

Write Better C# Tests with xUnit V3 and Microsoft Testing Platform

Write Better C# Tests with xUnit V3 and Microsoft Testing Platform

A Beginner's Guide to TUnit and Microsoft Testing Platform

A Beginner's Guide to TUnit and Microsoft Testing Platform

Beginner's Guide For Writing TUnit Tests In C#

Beginner's Guide For Writing TUnit Tests In C#

Projects

Project Framework Description
MicrosoftTestingPlatformExamples.SystemUnderTestProject The production code being tested across all test projects
MicrosoftTestingPlatformExamples.TestsWithMSTest MSTest Tests using MSTest with native Microsoft Testing Platform support
MicrosoftTestingPlatformExamples.XUnit xUnit v3 Tests using xUnit v3 with first-class MTP integration and standalone executable output
MicrosoftTestingPlatformExamples.LegacyXUnit xUnit v2 (legacy) Tests demonstrating xUnit v2 compatibility mode under MTP
MicrosoftTestingPlatformExamples.TUnit TUnit Tests using TUnit, a framework built entirely on Microsoft Testing Platform

Getting Started

  1. Clone the repository
  2. Open MicrosoftTestingPlatformExamples.sln in Visual Studio 2022+ (or use dotnet test)
  3. Run all tests: dotnet test
  4. Run a single test project as a standalone executable: dotnet run --project MicrosoftTestingPlatformExamples.XUnit

Key Concepts

  • Microsoft Testing Platform — a lightweight, AOT-compatible test runner replacing VSTest; test projects compile as self-contained executables
  • xUnit v3 — the latest xUnit release with native MTP support and improved parallelism
  • TUnit — a new .NET test framework built from the ground up on Microsoft Testing Platform with source-generated test discovery
  • Legacy xUnit (v2) — demonstrates backward-compatible usage of older xUnit projects under MTP

Newsletter

If you found this useful and you want to learn more about C#, .NET, and software engineering, subscribe to the free Dev Leader Weekly newsletter:

Subscribe to Dev Leader Weekly

Connect with Dev Leader


BrandGhost

Powered by BrandGhost 👻