Skip to end of metadata
Go to start of metadata
You are viewing documentation of TeamCity 6.5.x, which is not the most recent released version of TeamCity. Please refer to the listing to choose another version.

Table of Contents

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, command line, NUnitTeamCity task, NUnit task, nunit2 task.


Important Notes

  • In order to launch coverage, PartCover should be installed on an agent where coverage build will run.
  • You don't need to make any modifications to your build script to enable coverage.
  • You don't need to explicitly pass any of the PartCover arguments to the TeamCity NUnit test runner.
  • PartCover supports .NET Framework 2.0 and 3.5 started under x86 platform. Make sure you have configured your NUnit tests to run on the .NET Framework version 2.0 or 3.5 and under x86.

PartCover Settings



Path to PartCover

Specify the path to PartCover installed on a build agent, or corresponding system property, 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.


Note, that default xslt files bundled with PartCover 2.3 are broken and you need to write your own xslt files to be able to generate reports.

See also: