TeamCity NUnit Test Launcher
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.
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. |
<NUnit vers.> | Test framework to use. The value has to be specified in the following format: NUnit-<version>. |
/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: