Publish NUnit Report

Version 6 by Robin Shen
on Jun 19, 2008 23:38.


compared with
Current by Robin Shen
on Aug 06, 2009 18:35.


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

View page history


There are 11 changes. View first change.

 To add [NUnit|http://www.nunit.org] report, only need two steps:
 # Generate NUnit *XML* report from [NAnt|http://nant.sourceforge.net] or any other build tools.
 # Publish NUnit report in the [configuration|Working with Configuration].
  To publish [NUnit|http://www.nunit.org] report, you only need two steps:
 # Generate NUnit *XML* report from [NAnt|http://nant.sourceforge.net] or any other build tool.
 # Add NUnit report publish step by choosing _Publish -> NUnit Report_ from step menu.
  
 h2. Generate NUnit Report
QuickBuild will NOT generate [NUnit|http://www.nunit.org] report automatically, so first make sure the NUnit report is produced by [NANT|http://nant.sourceforge.net] or by any other build tools, the following example shows how to generate NUnit XML report by [NAnt task|http://nant.sourceforge.net]:
  
QuickBuild will NOT generate [NUnit|http://www.nunit.org] report automatically, so first make sure the NUnit report is produced by [NANT|http://nant.sourceforge.net] or by any other build tool. The following example shows how to generate NUnit XML report with [NAnt task|http://nant.sourceforge.net]:
 {code:xml|title= NUnit target in build.xml}
<target name="runUnitTests" description="Runs unit tests on specified dlls">
 <echo message="Before running tests"/>
  <target name="runUnitTests" description="Runs unit tests on specified dlls">
 <echo message="Before running tests"/>
  
<nunit2 failonerror="false" verbose="false">
 <formatter outputdir="${nant.project.basedir}"
 usefile="true" type="Xml" extension=".xml"/>
 <test assemblyname="${compile.dir}\foo.bar.dll" appconfig="${compile.dir}\foo.bar.dll.config"/>
 </nunit2>
 </target>
  <nunit2 failonerror="false" verbose="false">
 <formatter outputdir="${nant.project.basedir}"
 usefile="true" type="Xml" extension=".xml"/>
 <test assemblyname="${compile.dir}\foo.bar.dll" appconfig="${compile.dir}\foo.bar.dll.config"/>
 </nunit2>
 </target>
 {code}
After adding the target, you can generate the NUnit report for your source code, and then you can tell QuickBuild to publish the results.
  
After adding generate the NUnit report for your source code, you can tell QuickBuild to add those results now.
  
 h2. Publish NUnit Report
Just like all other [build reports|Publish Build Reports], to add NUnit report is by [adding a publish step|Working With Step] in a [configuration|Working with Configuration]. When you add publish NUit Report step, the following screen will be displayed:
  
!nunit_step.png!
  Just like all other [build reports|Publish Build Reports], you add NUnit report by [adding a publish step|Working With Step] in a [configuration|Working with Configurations]. When you add publish NUnit Report step, the following screen will be displayed:
  
In source report files field, QuickBuild use an [enhanced Ant style file patterns|File Pattern Reference] to collect the reports, and the directory you specified is *relative* to the [workspace|Glossary#Workspace] directory.
  !Screenshots^report_publish_step.png!
  
 Now, QuickBuild will analyze the NUnit report and will generate the Overview/Details after each build, and also will generate the trend graph for them.
  In source report files field, QuickBuild uses an [enhanced Ant style file patterns|File Pattern Reference] to collect the reports, and the directory you specified is *relative* to the [workspace|Concepts#Workspace] directory.
  
 QuickBuild will analyze the NUnit reports and will generate the Overview/Details after each build, and it will also collect the statistics data from the reports automatically so that you can track the tests trends in [the statistics tab|Working with Statistics].