Teamcity 5 - .NET Coverage Configuration

Teamcity 5 NCover configuration

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, command line, NUnitTeamCity task, NUnit task, nunit2 task. http://confluence.jetbrains.net/display/TCD5/NCover

.NET Coverage

  • NCover (1.x)
    • Path to NCover:* %system.ncover.v1.path%
    • Path to NCoverExplorer:* %system.ncover.v1.path% (Please copy the NCoverExplorer to the folder)
    • Assemblies to Profile: [assembly to profile]
  • If there "JetBrains.BuildServer.NUnitLauncher.exe "@@" C:\TeamCity\buildAgent\temp\buildTmp\tmpD6F8.tmp exited with code 20000"

        It need to register converlit.dll with NCover 1.x

    <Exec Command="regsvr32 &quot;$(ncover_v1_path)\coverlib.dll&quot; /s" Condition="'$(ncover_v1_path)'!=''" IgnoreExitCode="true" />    
<NUnitTeamCity Platform="x86" NUnitVersion="NUnit-2.5.2" Assemblies="$(PathToDall)" />
<Exec Command="regsvr32 &quot;$(ncover_v1_path)\coverlib.dll&quot; /u /s" Condition="'$(ncover_v1_path)'!=''" IgnoreExitCode="true" />

 

  • NCover (3.x)
    • Path to NCover 3:* %system.ncover.v3.x86.path%
    • Run NCover under: x86
    • NCover Arguments: //ias [namespace to exclude]
    • NCover Reporting Arguments: //or FullCoverageReport:Html:{teamcity.report.path}
posted @ 2010-03-15 22:24  kevinzx  阅读(737)  评论(0编辑  收藏  举报