Microsoft launches lightweight MSTest runner

Microsoft has introduced a lightweight and portable test runner for its MSTest unit testing framework.

paper airplane getting off the ground test
Thinkstock

Microsoft has introduced MSTest runner, a lightweight, portable runner for the MSTest unit testing framework.

Unveiled January 24, MSTest runner is extensible and makes tests more portable and reliable as well as making them run faster. Described as “a performant, hostable, extensible, reliable, and integrated solution” for running MSTests, MSTest runner is based on a barebones testing platform and an extensibility model designed to make it easy to extend or override aspects of test execution.

Developers can use MSTest runner to build and run MSTests as an independent portable executable. MSTest runner provides a simple console application to host and run tests, so developers do not need external tools such as VSTest, dotnet test, or Visual Studio to run tests. Tests can be authored for devices with limited power or storage.

Running tests directly from an executable removes complexity and infrastructure normally needed to run tests, Microsoft said. Existing dotnet tooling can be used to perform tasks with test projects such as building them as self-contained. With MSTest runner, new defaults are set that are safer and make it harder to accidently miss running any tests, according to Microsoft.

MSTest runner is bundled with the MSTest.TestAdapter NuGet package since version 3.2.0. To enable it for a project, developers can install the updated package and set two MSBuild properties, <EnableMSTestRunner> and <OutputType>.

Copyright © 2024 IDG Communications, Inc.