<project name="IDMAutomation" default="stop-server" basedir=".">
<property name="sourceDir" location="src" />
<property name="imgsDir" location="imgs" />
<property name="buildDir" location="bin" />
<property name="reportDir" location="reports" />
<property name="libDir" location="lib" />
<property name="profileDir" location="profiles" />
<property name="testSuiteLocation" location="testSuite" />
<path id="master-classpath">
<fileset dir="${libDir}">
<include name="*.jar"></include>
</fileset>
<pathelement path="${buildDir}"></
</path> <taskdef resource="testngtasks" classpath="${libDir}/testng-5. <target name="start-server"> <java jar="${libDir}/selenium- <arg line="-firefoxProfileTemplate ${profileDir} -singleWindow -ensureCleanSession" /> </java> </target> <target name="clean" description="Remove the build and report directories"> <delete dir="${buildDir}" /> <delete dir="${reportDir}" /> <delete dir="${imgsDir}" /> </target> <target name="build" description="Creates a build of the test suite."> <echo>"Making directory ${buildDir}"</echo> <mkdir dir="${buildDir}" /> <echo>"Making directory ${reportDir}"</echo> <mkdir dir="${reportDir}" /> <mkdir dir="${imgsDir}" /> <echo>"Doing build..."</echo> <javac destdir="${buildDir}" debug="true" deprecation="false" failonerror="true"> <src path="${sourceDir}" /> <classpath refid="master-classpath"></ </javac> </target> <target name="doTest" description="Execute TestNG tests"> <testng classpathref="master- sourcedir="${sourceDir}" workingDir="${buildDir}"> <!-- Specify suites or scripts to run here --> <xmlfileset dir="${testSuiteLocation}" includes="*.xml" /> </testng> </target> <target name="stop-server" depends="clean,build,start- <get taskname="selenium-shutdown" src="http://localhost:4444/ ignoreerrors="true" /> <echo taskname="selenium-shutdown" message="DGF Errors during shutdown are expected" /> </target> </project> |
No comments:
Post a Comment