A NAnt task that provides support for running Gallio tests.

Namespace:  Gallio.NAntTasks
Assembly:  Gallio.NAntTasks (in Gallio.NAntTasks.dll) Version: 3.3.0.0 (3.3.459.0)

Syntax

C#
public class GallioTask : Task
Visual Basic (Declaration)
Public Class GallioTask _
	Inherits Task

Remarks

In order for NAnt to find this task, either the Gallio.NAntTasks.dll assembly needs to be put in NAnt's bin folder, or it must be loaded with the loadtasks directive:

CopyC#
<loadtasks assembly="[pathtoassembly]\Gallio.NAntTasks.dll" />

Examples

The following code is an example build file that shows how to load the task, specify the test files and assemblies and set some of the task's properties:
CopyC#
<?xml version="1.0" ?>
<project name="TestProject" default="RunTests">
<!-- This is needed by NAnt to locate the Gallio task -->
<loadtasks assembly="[pathtoassembly]\Gallio.NAntTasks.dll" />
<target name="RunTests">
 <gallio result-property="ExitCode" failonerror="false" filter="Type=SomeFixture" >
  <files>
    <!-- Specify the tests files and assemblies -->
    <include name="[Path-to-test-assembly1]/TestAssembly1.dll" />
    <include name="[Path-to-test-assembly2]/TestAssembly2.dll" />
    <include name="[Path-to-test-script1]/TestScript1_spec.rb" />
    <include name="[Path-to-test-script2]/TestScript2.xml" />
  </files>
 </gallio>
 <fail if="${ExitCode != '0'}" >The return code should have been 0!</fail>
</target>

</project>

Inheritance Hierarchy

System..::.Object
  Element
    Task
      Gallio.NAntTasks..::.GallioTask

See Also