You are viewing the documentation of TeamCity 9.x, which is not the most recently released version of TeamCity.
View this page in the latest documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.

Skip to end of metadata
Go to start of metadata

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 the TeamCity build agent environment, the results are reported to the TeamCity agent.


Supported NUnit versions: For NUnit 3.x, use the NUnit build runner since TeamCity 9.1.
It is possible to have several versions of NUnit installed on an agent machine and use any of them in a build.

  • If you need to access the path to the TeamCity NUnit launcher from some process, you can add the %system.teamcity.dotnet.nunitlauncher% environment variable.
  • Values surrounded with "%" within custom scripts in the Commandline runner are treated as TeamCity references.

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



<.NET Framework>

Version of .NET Framework to run tests. Acceptable values are v1.1, v2.0, v4.0 or ANY.


Platform to run tests. Acceptable values are x86, x64 and MSIL.


For .NET Framework 1.1 only MSIL option is available.

<NUnit vers.>

Test framework to use. The value has to be specified in the following format: NUnit-<version>.


Supported NUnit versions: 2.2.10, 2.4.1, 2.4.6, 2.4.7, 2.4.8, 2.5.0, 2.5.2, 2.5.3, 2.5.4, 2.5.5, 2.5.6, 2.5.7, 2.5.8, 2.5.9, 2.5.10, 2.6.0, 2.6.1, 2.6.2, 2.6.3. Since TeamCity 9.1, NUnit 3.0 and above is also supported.


NUnit version 3.4.0 is not supported by the NUnit build runner due to a problem in NUnit. Only version 3.4.0 was affected, other NUnit 3.x versions work fine with TeamCity.


The list of categories separated by ';' (optional).


The list of categories separated by ';' (optional).


List of third-party NUnit addins to use (optional).

<assemblies to test>

List of assemblies paths separated by ';' or space.


Specify, if you want to run each assembly in a new process.


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

Run tests from an assembly:

Run tests from an assembly with NUnit categories filter

Run tests from assemblies:

<div class="aui-message error">
<p class="title">
<span class="aui-icon icon-error"> </span>
The license could not be verified: License Certificate has expired!

  • No labels

1 Comment

  1. Use the following processes to make TeamCity starting exactly one precess to run unit tests:

    • JetBrains.TeamCity.PlatformProcessRunner.1.1.exe
    • JetBrains.TeamCity.PlatformProcessRunner.msil.exe
    • JetBrains.TeamCity.PlatformProcessRunner.v4.0.msil.exe
    • JetBrains.TeamCity.PlatformProcessRunner.v4.0.x64.exe
    • JetBrains.TeamCity.PlatformProcessRunner.v4.0.x86.exe
    • JetBrains.TeamCity.PlatformProcessRunner.x64.exe
    • JetBrains.TeamCity.PlatformProcessRunner.x86.exe

    This file is places in the same directory as %teamcity.dotnet.nunitlauncher%.