NUnit Support
NUnit runner
The easiest way to set up NUnit tests reporting in TeamCity is to add NUnit as one of the steps to your Creating and Editing Build Configurations and specify there all the required parameters. Please, refer to NUnit page.
Alternative approaches
However, if for some reason it is not applicable, TeamCity provides the following ways to configure NUnit tests reporting in TeamCity:
TeamCity supports the standard NUnit for NAnt Build Runner.
TeamCity provides the NUnit for MSBuild and supports the NUnit for MSBuild from MSBuild Community tasks.
TeamCity provides its own NUnit Test Launcher that can be configured NUnit for MSBuild or launched from the TeamCity NUnit Test Launcher.
TeamCity Addin for NUnit is available to turn on reporting on the NUnit level without build procedure modifications.
The bundled XML Report Processing allows importing any xml report to TeamCity. In this case it is not always possible to track results on the fly. You can add the XML Report Processing build feature to your build configuration, or use the following service message:
##teamcity[importData type='sometype' path='<path to the xml file>']
. Learn more: XML Report Processing, Build Script Interaction with TeamCity.TeamCity allows configuring tests reporting manually via Build Script Interaction with TeamCity.
Comparison matrix:
Approach | Real-Time Reporting | Execution without TeamCity | Tests Reordering | Implicit TeamCity .NET Coverage |
---|---|---|---|---|
NUnit runner | ||||
| / * | |||
| / * | |||
| / * | |||
TeamCity Addin for NUnit | ||||
TeamCity NUnit Test Launcher | ||||
XML Reporting Plugin | 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.