Internet Explorer is no longer supported. Many things will still work, but your experience will be degraded and some things won't function. Please use a modern browser such as Edge, Chrome, or Firefox.

dotnet test

Runs unit tests on a specified test project using the dotnet test command.

Script usage:

DotNet::Test(
	Project: <text>,
	[Configuration: <text>],
	[PackageSource: <text>],
	[Group: <text>],
	[Framework: <text>],
	[AdditionalArguments: <text>],
	[EnsureDotNetInstalled: <text>],
	[DotNetPath: <text>]
);

Arguments:

NameFormatScript UsageUsage Notes
Project path
text
Project
This must be the path to either a project file, solution file, or a directory containing a project or solution file. This argument is required.
Configuration
text
Configuration
Package source
text
PackageSource
If specified, this NuGet package source will be used to restore packages when building.
Test group
text
Group
Value note: "Unit Tests".
Framework
text
Framework
Additional arguments
text
AdditionalArguments
Ensure dotnet installed
text
EnsureDotNetInstalled
This uses Microsoft's dotnet-install script to ensure that the specified version is installed. Values other than "auto" will be passed to the Channel parameter. The "auto" value will attempt to determine the SDK your project uses and ensure that it is installed. Value note: "not set (do not install)".
dotnet path
text
DotNetPath
Full path of dotnet.exe (or dotnet on Linux). This is usually C:\Program Files\dotnet\dotnet.exe on Windows. If no value is supplied, the operation will default to %PROGRAMFILES%\dotnet\dotnet.exe for Windows and dotnet (from the path) on Linux. Value note: "default".