NUnitReportTask Class

Summary

A task that generates a summary HTML from a set of NUnit xml report files. Loosely based on Erik Hatcher JUnitReport for Ant.
Assembly
NAnt.Contrib.dll
Namespace
NAnt.Contrib.Tasks
Base Types
  • Task
graph BT Type-->Base0["Task"] Type["NUnitReportTask"] class Type type-node

Syntax

[TaskName("nunitreport")]
public class NUnitReportTask : Task

Examples

<nunitreport 
            out="${outputdir}\TestSummary.html"
            >
         <fileset>
            <include name="${outputdir}\Test-*.xml" />
         </fileset>
      </nunitreport>

Remarks

This task can generate a combined HTML report out of a set of NUnit result files generated using the XML Result Formatter. By default, NUnitReport will generate the combined report using the NUnitSummary.xsl file located at the assembly's location, but you can specify a different XSLT template to use with the
xslfile
attribute. Also, all the properties defined in the current project will be passed down to the XSLT file as template parameters, so you can access properties such as nant.project.name, nant.version, etc.

Attributes

Type Description
TaskName

Properties

Name Value Summary
OutFilename string
Name of Output HTML file.
XmlFileSet FileSet
Set of XML files to use as input
XslFile string
XSLT file used to generate the report.

Methods

Name Value Summary
ExecuteTask() void
This is where the work is done
Initialize() void
Initializes task and ensures the supplied attributes are valid.