1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
<target name="clean">
<delete dir="build"/>
</target>
<target name="compile">
<mkdir dir="${classes}"/>
<javac srcdir="${src}" destdir="${classes}" classpath="${build.classpath}"/>
</target>
<target name="start-server">
<java jar="lib/selenium-server.jar" fork="true" spawn="true">
<arg line="-timeout 30" />
<jvmarg value="-Dhttp.proxyHost=proxy.proxyhost.com" />
<jvmarg value="-Dhttp.proxyPort=44444" />
</java>
</target>
<target name="stop-server">
<get taskname="selenium-shutdown"
src="http://localhost:4444/selenium-server/driver/?cmd=shutDown"
dest="build/selenium-server-out.txt" ignoreerrors="true" />
<echo taskname="selenium-shutdown" message="DGF Errors during shutdown are expected" />
</target>
<target name="tests" description="runs JUnit tests">
<junit printsummary="on" haltonfailure="off" haltonerror="off" timeout="${junit.timeout}" showoutput="true">
<classpath>
<pathelement location="${classes}"/>
<pathelement path="${build.classpath}"/>
</classpath>
<formatter type="plain" />
<test name="mon.package.AllTests" outfile="build/test-results">
<formatter type="xml"/>
</test>
<!--
<batchtest todir="${testoutput}" filtertrace="on">
<fileset dir="${src}">
<includesfile name="${tests.include}" />
<excludesfile name="${tests.exclude}" />
</fileset>
</batchtest>
-->
</junit>
</target>
<target name="report">
<echo message="running JUnit Reports" />
<delete dir="build/reports" />
<mkdir dir="build/reports" />
<junitreport todir="build/reports">
<fileset dir="build">
<include name="test-results.xml" />
</fileset>
<report format="frames" todir="build/reports" />
</junitreport>
<echo message="To see your Junit results, please open build/reports/index.html" />
</target>
<target name="build_tests" depends="clean, compile, start-server, tests, stop-server, report" /> |
Partager