<!-- Build file for our first application -->
<project name="Automation Framework" default="build" basedir=".">
<property name="lib.dir" value="lib"/>
<path id="classpath">
<fileset dir="${lib.dir}" includes="**/*.jar"/>
</path>
<target name="build">
<javac srcdir="src" destdir="bin" debug="true" includes="**/*.java"
classpathref="classpath"/>
</target>
<target name="runtests">
<testng classpathref="classpath"
outputDir="test-output"
sourcedir="src"
haltOnfailure="true">
<xmlfileset dir="." includes="testng.xml"/>
</testng>
</target>
</project>
【testng.xml】
<!DOCTYPE suite SYSTEM "http://beust.com/testng/<wbr>testng-1.0.dtd</wbr>" >
<suite name="My test suite">
<test name="Login Test">
<classes>
<class name="com.watershed.tests.<wbr>homepage.LoginTest" /><br> </classes><br> </test><br> </suite></wbr>