Manual

22.2
Ant

People who are using Apache Ant (http://ant.apache.org) as build system may easily integrate QF-Test in their build file:

<project name="QF-Test" default="runtest">

    <property name="qftest"
      location="c:\Program Files\qfs\qftest\qftest-4.2.5\bin\qftest.exe" />
    <property name="logdir" value="c:\mylogs" />

    <target name="runtest" description="Run a test in batchmode">
        <echo message="Running ${suite} ..." />
        <exec executable="${qftest}" failonerror="false"
      resultproperty="returncode">
            <arg value="-batch" />
            <arg value="-compact" />
            <arg value="-runlog" />
            <arg value="${logdir}\+b" />
            <arg value="${suite}" />
        </exec>
        <condition property="result"
      value="Test terminated successfully.">
            <equals arg1="${returncode}" arg2="0" />
        </condition>
        <condition property="result"
      value="Test terminated with warnings.">
            <equals arg1="${returncode}" arg2="1" />
        </condition>
        <condition property="result"
      value="Test terminated with errors.">
           <equals arg1="${returncode}" arg2="2" />
        </condition>
        <condition property="result"
      value="Test terminated with exceptions.">
            <equals arg1="${returncode}" arg2="3" />
        </condition>
        <echo message="${result}" />
    </target>

</project>
        
Example 22.1:  Ant build file build.xml to execute a test-suite

The above example assumes the test-suite to be defined as property when running ant: ant -Dsuite="c:\Program Files\qfs\qftest\qftest-4.2.5\demo\carconfig\carconfig_en.qft".