Unable to render embedded object: File (TeamCity48.png) not found.

TeamCity 9.x Documentation

Documentation for Previous Versions

Icon

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

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

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.

Icon
  • 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:

Option

Description

<.NET Framework>

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

<platform>

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

Icon

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>.

Icon

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.

Icon

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.

/category-include:<list>

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

/category-exclude:<list>

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

/addin:<list>

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

<assemblies to test>

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

/runAssemblies:processPerAssembly

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

Examples

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!
</p>
</div>

  • No labels