NUnit

Last modified: 20 April 2023

NUnit build runner is intended to run NUnit tests right on the TeamCity server. However, there are other ways to report NUnit tests results to TeamCity, please refer to the NUnit Support page for the details.

NUnit 3 Requirements



Installing NUnit



To use the TeamCity NUnit build runner, you need to install NUnit NuGet package on TeamCity agents first.

Installing Extensions



Starting from version 3.2.0, NUnit requires the NUnit.Extension.NUnitProjectLoaderextension to be installed on the TeamCity agent. Starting from version 3.4.1, NUnit requires the NUnit.Extension.TeamCityEventListenerextension to be installed on the TeamCity agent.

The extensions can be installed in bulk using the NUnit Console Version 3 NuGet package or as separate packages, NUnit.Extension.TeamCityEventListener and NUnit.Extension.NUnitProjectLoader. If you are experiencing build problems or issues displaying test results with NUnit versions listed above, make sure the extensions are present on the TeamCity build agent.

NUnit Test Settings



Code Coverage



To learn about configuring code coverage options, please refer to the Configuring .NET Code Coverage page.

For NUnit 3.x, only JetBrains dotCover is supported as a coverage tool.

Administrator's Guide: Configuring Unit Testing and Code Coverage | NUnit Support | Getting Started with NUnit