TeamCity 5.0 Help

PartCover

TeamCity supports code coverage with PartCover (2.2 and 2.3) 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.

To configure PartCover:

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

  2. Select PartCover (2.2 or 2.3) as a .NET coverage tool.

  3. Set up the PartCover options - find the description of the available options below.

Option

Description

Path to PartCover

Specify the path to PartCover installed on a build agent, or corresponding 6.Properties and environment variables, if configured.

Additional PartCover Arguments

Specify additional PartCover arguments, except the ones that can be specified using web UI. Moreover, do not specify here the output path for the generated reports, because TeamCity configures it automatically.

Include Assemblies

Explisitly specify the assemblies to profile, or use [*]* to include all assemblies.

Exclude Assemblies

Explicitly specify the assemblies to be excluded from coverage statistics. If you have specified [*]* to profile all assemblies, type [JetBrains*]* here to exclude TeamCity NUnit test runner sources.

Report XSLT

Write xslt transformation rules in the following format (one per line): file.xslt=>generatedFileName.html. As file.xslt you can use the default PartCover xslt, or your own. Xslt files path is relative to build's checkout directory.

Last modified: 20 April 2023