TeamCity
 
You are viewing the documentation for an earlier version of TeamCity.

NCover

Last modified: 20 April 2023

TeamCity supports code coverage with NCover (1.x and 3.x) for NUnit tests run via TeamCity NUnit test runner, which can be configured in one of the following ways: web UI, TeamCity NUnit Test Launcher, NUnit for MSBuild, NUnit for MSBuild, NUnit for NAnt Build Runner.

Configuring NCover 1.x



Make sure your NUnit tests run under x86.

To configure NCover 1.x:

  1. While creating/editing Build Configuration, go to the Build Steps page.

  2. Add NUnit or MSTest build step, configure unit tests.

  3. Select NCover (1.x) in .NET coverage tool.

  4. Set up the NCover options - find the description of the available options below.

Configuring NCover 3.x



Make sure, you use have specified the same platform both for NCover and NUnit.

To configure NCover 3.x:

  1. While creating/editing Build Configuration, go to the Build Steps page.

  2. Add NUnit or MSTest build step, configure unit tests.

  3. Select NCover (3.x) as a .NET coverage tool.

  4. Set up the NCover options - find the description of the available options below.