<?xml version="1.0" encoding="ISO-8859-1"?>

<!-- sample ant script for Wetator -->

<project name="Wetator Ant Sample" basedir="." default="run_wetator">

    <!--
       You can use Ant project properties to overwrite properties defined in the config-file.
       The name of the property has to start with 'wetator.'.
       If you define the same property as inner element of the wetator task,
       then this one will be overwritten.
     -->
    <property name="wetator.baseUrl" value="http://www.wetator.org"/>

    <!-- adjust dir for your project -->
    <path id="wetator-classpath">
        <fileset dir="../../lib" includes="**/**.jar"/>
    </path>

    <!-- You have to declare the task first -->
    <taskdef name="wetator" classname="org.wetator.ant.Wetator" classpathref="wetator-classpath" />

    <target name="run_wetator" description="Sample target that runs Wetator" >
        <!-- Attributes:
             'config'          - full name of your config-file (required)
             'failureproperty' - The name of a property to set to
                                 true in the event of a failure (errors are considered failures as well).
             'haltonfailure'   - Stop the build process if a test fails (errors are considered failures as well).
                                 The build process is stopped after all wetator test are executed.

             the input files are defined as fileset
             more about filesets under http://ant.apache.org/manual/CoreTypes/fileset.html
        -->
        <wetator config="sample.properties">
            <fileset>
                <include name="test/wetator/*.xls"/>
            </fileset>

            <!--
               You can use properties to overwrite properties defined in the config-file.
               The name of the property has to start with 'wetator.'.
               This overwrites properties defined for the project.
             -->
            <property name="wetator.baseUrl" value="http://www.wetator.org"/>

            <!--
              set variables;
              to define a secret property you need $$$ (you really need three $ signs for ant)
            -->
            <property name="$user" value="dobby"/>
            <property name="$$$password" value="secret"/>
        </wetator>

    </target>

</project>
