Microsoft Unveils MSTest SDK for Enhanced Testing Framework Experience

Microsoft has introduced the MSTest SDK, aiming to elevate the .NET unit testing landscape by providing improved defaults, streamlined usage, and enhanced extensibility.

Unveiled on April 11, the MSTest SDK leverages the MSBuild Project SDK system and builds upon the MSTest runner, aiming to offer developers a more seamless testing experience with MSTest, Microsoft’s unit testing framework.

The MSTest SDK simplifies project configuration by offering sensible defaults and flexible options, simplifying the process for developers. To leverage the MSTest SDK, developers are required to create a new MSTest project or update an existing one, replacing the contents of the .csproj file.

Among the key advantages of the MSTest SDK are enhanced defaults, simplified extensibility, and effortless adoption of new features like native AOT tests. The default recommendations are aligned with the established patterns of various application types such as ASP.NET Core, Razor, and Windows Desktop, ensuring consistency across projects. Developers can seamlessly update to newer default suggestions by updating the MSTest SDK version.

In addition to the MSTest runner, Microsoft offers a suite of extensions as NuGet packages to enrich testing capabilities. To assist developers in choosing the appropriate defaults and extensions for their testing projects, Microsoft has introduced profiles within the MSTest SDK, including Default, AllMicrosoft, and None. The Default profile incorporates Microsoft CodeCoverage and Trx.Report extensions.

While the MSTest SDK style is still evolving, it serves as the foundation for Microsoft’s upcoming enhancements and features. Microsoft encourages MSTest users to transition to this SDK style, which is poised to become the standard for MSTest project templates in .NET 9.