NAnt Usage Guidelines


Attribute Description Required
out The name of the Html file that will result of the transformation. Default to "index.htm". False
lang The language ouput. Default to "english". False
format The format of the generated report. Must be "noframes" or "frames". Default to "noframes". False
todir The directory where the files resulting from the transformation should be written to. False
opendesc Open all description method. Default to false. False

Nested Elements

fileset (FileSet)

Filesets are used to select XML result files generated by the NUnit2 tests.

summaries (FileSet)

summaries are used to select XML C# comment files (of the test dll) generated by the .NET compilation.

Limitation : Only, one xml result file is accept for nested element.


<project name="NUnitReport" default="nunitreport" basedir=".">
<!-- Init Nant properties -->
<tstamp property="" pattern="dd-MM-yyyy" verbose="true"/>

<target name="nunitreport">
  <!-- By default the report is in english, format is noframes by default -->
    <nunit2report out="NUnitReport(No-Frame).html" >
        <includes name="result.xml" />

  <!-- A report with frame in french, out file is index.htm by default -->
    <nunit2report lang="fr" format="frames" opendesc="yes" todir="DirResult">
        <includes name="result.xml" />
        <includes name="result.Comment.xml" />

<echo message="NUnit report generated."/>