A console MSTest runner
Lightweight, standalone, no external dependencies.
Cross-platform, tested on Microsoft .NET Framework and .NET Core on Windows, and Mono and .NET Core on Linux.
Multi-process, runs test assemblies in their own isolated processes.
Reflection-based, runs test assemblies built against any variant or version of the MSTest dll.
Provides System.Diagnostics.Trace output.
Provides test timing information.
Provides detailed exception information in the case of failures.
Supports test attributes [TestClass], [TestMethod], [TestInitialize], [TestCleanup], [ClassInitialize], [ClassCleanup], [AssemblyInitialize], [AssemblyCleanup], [ExpectedException], and [Ignore].
Supports TestContext
members CurrentTestOutcome
, FullyQualifiedTestClassName
, and TestName
.
Supports test assembly .config
files.
Partial test attribute coverage (see Features).
Partial TestContext
coverage on .NET Framework (see Features).
Test assembly .config
files don't work on Mono because of a
bug in Mono.
<bindingRedirect>
s in test assembly .config
files may not work.
.NET Framework v4.6.1 (or newer) OR .NET Core 2.0 (or newer) OR Mono v5.0.0 (or newer).
Available as a NuGet package named TestRunner.
testrunner.exe <testassemblies>
<testassemblies> - Path(s) to assembly(s) containing MSTest tests
0 if all specified test assemblies succeed, otherwise non-zero.
Test assemblies succeed if all test, initialization, and cleanup methods run successfully.
Test assemblies succeed if they contain no tests.
Test assemblies succeed if they are not .NET assemblies.
Test assemblies fail if any test, initialization, or cleanup methods fail.
Test assemblies fail if the file does not exist.
C:\> testrunner.exe C:\Path\To\TestAssembly.dll C:\Path\To\AnotherTestAssembly.dll
C:\> dotnet testrunner.dll C:\Path\To\TestAssembly.dll C:\Path\To\AnotherTestAssembly.dll
$ mono --debug testrunner.exe /path/to/TestAssembly.dll /path/to/AnotherTestAssembly.dll
dotnet publish -f net461
dotnet publish -f netcoreapp2.0
msbuild /p:TargetFramework=net461 /t:Restore
msbuild /p:TargetFramework=net461 /t:Rebuild
msbuild /p:TargetFramework=net461 /t:Publish
MS-PL <https://github.com/macro187/testrunner/blob/master/license.txt>
Copyright (c) 2012-2018
Ron MacNeil <https://github.com/macro187>
Rickenberg <https://www.codeplex.com/site/users/view/Rickenberg>
JDeltorp <https://github.com/JDeltorp>
Forked from <https://testrunner.codeplex.com/> revision 87713 on September 24th, 2016
net461 build and tests
netcoreapp2.0 build and tests
net461 build and tests (Mono)
netcoreapp2.0 build and tests (.NET Core)