Publish NCover Report

Version 2 by Steve Luo
on Jun 10, 2010 18:48.


compared with
Current by Steve Luo
on Jun 20, 2010 17:23.


 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 2 changes. View first change.

 To publish NCover reports, you need:
  
 # Generate NCover *SymbolModuleNamespaceClassMethod* XML reports by using [ncover|http://www.ncover.com].
  # Generate NCover *SymbolModuleNamespaceClassMethod* XML reports by using [NCover|http://www.ncover.com].
 # Add a Publish NCover Reports step in your configuration steps.
  
 After doing this, QuickBuild will generate the NCover reports automatically.
  
 {note:title=Note}
 * QuickBuild only parses the XML reports.
 * NCover version should be 3.0+
 * The NCover report type should be SymbolModuleNamespaceClassMethod
 {note}
  
 h2. 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:
  
 {code}
 <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>
 {code}
  
  
  
 h2. Publish NCover Reports
 Add _*Publish NCover Report*_ step to your build workflow. If you have several report sets, you can add several steps with different report set names. Reference [this page|Publish Build Reports] for more details.
  
  
 {info}
 Especially thanks for the help from [NCover developer team|http://www.ncover.com]
 {info}