Microsoft offers SDK for testing framework

The MSTest SDK is intended to improve the .NET unit testing experience through better defaults, simpler usage, and easier extensibility.

A developer works across multiple displays showing lines of code in a dimly lit workspace.
Roman Samborskyi / Shutterstock

Microsoft has announced the MSTest SDK. Built on the MSBuild Project SDK system and based on the MSTest runner, the MSTest SDK is designed to give developers a better experience for testing with MSTest, Microsoft’s framework for unit testing.

The MSTest SDK, announced April 11, makes project configuration easier via sensible defaults and flexible options, Microsoft said. To use the MSTest SDK, developers must create an MSTest project, or update an existing MSTest project, and replace the content of the .csproj file.

Advantages of the new MSTest SDK include better defaults, easier extensibility, and easier opt-in for new features such as native AOT tests. The default suggestions align with patterns provided by the main types of applications such as ASP.NET Core, Razor, and Windows Desktop. The SDK will use the default suggestions that the MSTest team makes for these projects. As these are updated, developers need only update the MSTest SDK version to get the new defaults.

In addition to MSTest runner, Microsoft is shipping a set of extensions that developers can install as NuGet packages to enhance their testing. And to help developers select both the correct defaults and the right extensions for their test projects, Microsoft has introduced profiles in the MSTest SDK. Three profiles currently are being provided: Default, AllMicrosoft, and None. Default includes the Microsoft CodeCoverage and Trx.Report extensions.

While the MSTest SDK style still is in development, it stands as the cornerstone of Microsoft’s forthcoming evolutions and features, the company said. Microsoft encourages MSTest users to transition to this SDK style that will become the standard for the MSTest project template in .NET 9.

Copyright © 2024 IDG Communications, Inc.