Dashboard > GreenPepper Open Documentation Refactoring > ... > 2. Use NAnt plugin > GreenPepper NAnt task
  GreenPepper Open Documentation Refactoring Log In View a printable version of the current page.  
  GreenPepper NAnt task
Added by Laurent Cobos, last edited by Laurent Cobos on Aug 14, 2009
Labels: 
(None)

<greenpepper> task

NAnt task that executes GreenPepper specifications.

Parameters

Attribute Type Description Required
input string The specification to use as input, for a suite this is the GreenPepper UID that you can find in your GreenPeppper Confluence's Space Registration page True
output directory The path to produce reports (defaults to current directory) True
output-type string The output type of report (defaults to plain) False
suite bool It runs a suite rather than a single test (output must refer to a directory). False
appconfig string The application configuration file to use for the GreenPepper test domain. If none specified, will try all assemblies to see if there is a corresponding .config (only the first one will be use) False
failonerror bool It determines if task failure stops the build or if it is just reported. The default is true. False
if bool If true, the task is executed; otherwise, it is skipped. The default is true. False
unless bool Opposite of if. If false, the task is executed; otherwise, it is skipped. The default is false. False
verbose bool It determines whether the task should report detailed build log messages. The default is false. False
stopOnFirstFailure bool Stop the execution of the specification on the first failure. The default is false. False

 Nested elements:

<assembly>

List of assemblies to use for execution.

</assembly>

<systemUnderDevelopment>

The system under development to execute.
It defines the system under development.

Parameters

Attribute Type Description Required
class string The class name of the system under development to instanciate. The default value is GreenPepper.Fixtures.PlainOldSystemUnderDevelopment. False

Nested elements:

<arguments>

List of arguments for the system under development.
It represents an element for which the XML is processed by the parent task or type.

</arguments>

</systemUnderDevelopment>

<repository>

The repository to fetch specifications from.
It defines the repository.

Parameters

Attribute Type Description Required
class string The class name of the repository to instanciate. Default is Greenpepper.Repositories.FileSystemRepository. False

Nested elements:

<arguments>

List of arguments for the repository like Confluence space username and password for the GreenPepperRepository.
It represents an element for which the XML is processed by the parent task or type.

</arguments>

</repository>

<section>

The section to filter execution.
It defines a section to filter.

Nested elements:

<include>

List of sections to filter execution.
It represents an element for which the XML is processed by the parent task or type.

</include>

</section>

Requirements

Assembly: GreenPepper.Extensions ()

Examples

With the FileSystemRepository: 

    <target name="execute" description="execute GreenPepper specifications" depends="clean,compile-test">
        <loadtasks assembly="${bin.dir}/GreenPepper.Extensions.dll" />

        <greenpepper suite="true"
                     input="Specifications"
                     output="GreenPepperReports"
                     output-type="xml"
                     appconfig="${bin.dir}/GreenPepper.Samples.dll.config">

            <systemUnderDevelopment class="GreenPepper.Fixtures.MyCustomSystemUnderDevelopment">
                <arguments>abc</arguments>
            </systemUnderDevelopment>

            <repository class="GreenPepper.Repositories.FileSystemRepository">
                <arguments>..\Samples</arguments>
            </repository>

            <section>
                <include>unix</include>
            </section>

            <assembly basedir="${bin.dir}">
                <include name="GreenPepper.Samples.dll"/>
                <include name="GreenPepper.Extensions.dll"/>
                <include name="GreenPepper.Extensions.Tests.dll"/>
            </assembly>

        </greenpepper>

    </target>

With the GreenPepper repository (note the CDATA for the URL): 

<greenpepper input="List of Interpreter"
                     output="GreenPepperReports"
                     output-type="plain">
            <repository class="GreenPepper.Repositories.GreenPepperRepository">
                <arguments><![CDATA[
                    http://www.greenpeppersoftware.com/confluence/rpc/xmlrpc?handler=greenpepper1&sut=GreenPepperOpen - Core DotNet&includeStyle=false&implemented=true#GREENPEPPER
                ]]></arguments>
                <arguments>username</arguments>
                <arguments>password</arguments>
            </repository>
            <assembly basedir="${bin.dir}">
                <include name="GreenPepper.Fixtures.dll"/>
                <include name="GreenPepper.Extensions.dll"/>
            </assembly>
        </greenpepper>

DEMONSTRATION LICENSE - This Confluence site is for demonstration purposes only. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.4.3 Build:#705 Mar 21, 2007) - Bug/feature request - Contact Administrators