TeamCity
 
You are viewing the documentation for an earlier version of TeamCity.

TeamCity NUnit Test Launcher

Last modified: 20 April 2023

TeamCity provides its own NUnit tests launcher that can be used from command line. The tests are run according to the passed parameters and if the process is run inside TeamCity build agent environment, the results are reported to the TeamCity agent.

You can pass to the TeamCity NUnit Test Launcher the following command line options:

${teamcity.dotnet.nunitlauncher} <.NET Framework> <platform> <NUnit vers.> [/category-include:<list>] [/category-exclude:<list>] [/addin:<list>] <assemblies to test>

Examples



The following examples assume that the teamcity.dotnet.nunitlauncher property is set as system property on the Configuring Build Parameters page of the Build Configuration.

Run tests from an assembly:

%teamcity.dotnet.nunitlauncher% v2.0 x64 NUnit-2.2.10 Assembly.dll

Run tests from an assembly with NUnit categories filter

%teamcity.dotnet.nunitlauncher% v2.0 x64 NUnit-2.2.10 /category-include:C1 /category-exclude:C2 Assembly.dll

Run tests from assemblies:

%teamcity.dotnet.nunitlauncher% v2.0 x64 NUnit-2.5.0 /addin:Addin1.dll;Addin2.dll Assembly.dll Assebly2.dll