TeamCity provides a variety of ways to set up NUnit tests reporting. It is able of running NUnit tests by means of TeamCity NUnit Test Launcher, as well as it can pick up the tests results from another runner.
Basically, NUnit support in TeamCity includes the following:
TeamCity NUnit Test Launcher (this also relates to <nunit2> or <NUnit> task usage) supports 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, and 2.5.5.
TeamCity Addin for NUnit supports versions 2.4.6, 2.4.7, 2.4.8, 2.5.0, 2.5.2, 2.5.3, 2.5.4, and 2.5.5.
XML Reporting plugin supports any versions
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 run-time environment versions. You can define whether to use .NET Framework 1.1, 2.0 or 4.0 started under MSIL, x64 or x86 platform.
tip
If you are not sure about which option suits most for your case, we recommend to read the About NUnit Support page, which gives general tips on how to choose the way of running NUnit tests depending on the runner you use.
old page content
There are multiple ways to run tests with NUnit to support TeamCity's test reporting ability:
for NAnt build: use standard <nunit2> task in NAnt build (it is NUnit for NAnt build runner with TeamCity-capable task);
For all supported NUnit versions TeamCity tracks the tests and reports all the information on-the-fly (both in the web UI and your IDE). In real-time mode TeamCity Tests Tab on every test run within a build: its status, name, package, duration, and statistics.
TeamCity informs user about tests failure immediately and provides details on occurred errors on the Overview tab of Build Results Home Page. For each failed or ignored test TeamCity web UI provides a direct link to open it in your IDE.
Besides, TeamCity relieves a headache of running your tests under x86 process on the x64 machine by introducing an explicit specification of the platform and run-time environment versions. You can define whether you use .NET 1.1 and MSIL, x64 or x86 platform to use for .NET 2.0 version in TeamCity NUnit Test Launcher, NUnit for NAnt Build Runner, NUnit for MSBuild, sln2003, sln2005, sln2008.
note
In order to support the real-time reporting test results, TeamCity should either run the tests using its own TeamCity NUnit Test Launcher or be able to interact with the .NET Testing Frameworks Support so it receives notifications on test events. Custom TeamCity-aware test runners are used to implement the bundled support for the testing frameworks.