Icon

You are viewing the documentation of TeamCity 10.x and 2017.x, which is not the most recently released version of TeamCity.
View this page in TeamCity 2018.x 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

NUnit runner

The easiest way to set up NUnit tests reporting in TeamCity is to add NUnit build runner as one of the steps to your build configuration making sure the requirements are met and specify there all the required parameters.

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.

It is possible to have several versions of NUnit installed on an agent machine and use any of them in a build.

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.


 


For details refer to NUnit build runner page.

Alternative approaches

If using NUnit build runner is inapplicable, TeamCity provides the following ways to configure NUnit tests reporting in TeamCity:

Comparison matrix:

Approach

Real-Time Reporting

Execution without TeamCity

Tests Reordering

Implicit TeamCity .NET Coverage

NUnit runner

(tick)

(error)

(tick)

(tick)

<nunit2> NAnt task

(tick)

(tick)/(error)*

(tick)

(tick)

<NUnit> MSBuild task

(tick)

(tick)/(error)*

(tick)

(tick)

<NUnitTeamCity> MSBuild task

(tick)

(tick)/(error)*

(tick)

(tick)

TeamCity Addin for NUnit

(tick)

(error)

(error)

(error)

TeamCity NUnit Test Launcher

(tick)

(error)

(tick)

(tick)

XML Reporting Plugin

(error)

only xml

N/A

N/A

* TeamCity-provided tasks may have different syntax/behavior. Some workarounds may be required to run the script without TeamCity.

In addition to the common test reporting features, TeamCity relieves a headache of running your NUnit tests under x86 process on the x64 machine by introducing an explicit specification of the platform and runtime environment versions. You can define whether to use .NET Framework 1.1, 2.0 or 4.0 started under a MSIL, x64 or x86 platform.

This section covers:



See also:

1 Comment

  1. NUnit, PSake and TeamCity integration is available at https://github.com/agross/TeamCityNUnit