Publish NCover Report (for 2.1)

You are viewing an old version (v. 3) of this page.
The latest version is v. 6, last edited on Jan 21, 2010 (view differences | )
<< View previous version | view page history | view next version >>

To publish NCover reports, you need:

  1. Generate NCover * SymbolModuleNamespaceClassMethod* XML reports by using ncover.
  2. Add a Publish NCover Reports step in your configuration steps.

After doing this, QuickBuild will generate the NCover reports automatically.

Note
  • QuickBuild only parses the XML reports.
  • NCover version should be 3.0+

Generate NCover XML Reports

The NCover SymbolModuleNamespaceClassMethod XML reports can be generated from NCover command tool or msbuild or nant. Below we are using msbuild to generate the coverage report:

<UsingTask 
  TaskName="NCover.MSBuildTasks.NCover"
  AssemblyFile="C:\Program Files\NCover\Build Task Plugins\NCover.MSBuildTasks.dll" />
<UsingTask
  TaskName="NCover.MSBuildTasks.NCoverReporting"
  AssemblyFile="C:\Program Files\NCover\Build Task Plugins\NCover.MSBuildTasks.dll" />

<Target Name="Coverage">
  <NCover ToolPath="C:\Program Files\NCover\"
      TestRunnerExe="$(NUnitPath)\nunit-console.exe"
      TestRunnerArgs="TestAssembly1.dll TestRunner2.dll"
      CoverageFile="Coverage.xml"/>
</Target>

<PropertyGroup>
    <Reports>
        <Report>
            <ReportType>SymbolModuleNamespaceClassMethod</ReportType>
            <Format>Xml</Format>
            <OutputPath>$(outputDir)\smncm.xml</OutputPath>
        </Report>
    </Reports>
</PropertyGroup>

<Target Name="CreateCoverageReports">
    <NCoverReporting ToolPath="C:\Program Files\NCover\"
        CoverageDataPaths="Coverage.xml"
        OutputReport="$(Reports)"
    />
</Target>

Publish NCover Reports

Just like all other build reports, you add NCover report by adding a publish step in a configuration. When you add publish NCover Report step, the following screen will be displayed:
Unable to render embedded object: File (report_publish_step.png) not found.

In Report Files/Patterns field, QuickBuild uses Ant style file patterns to collect the reports, and the directory you specified is relative to the [workspace] directory.

If you have several report sets, you can add several publish NCover steps with different report set names.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.