-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
54 lines (46 loc) · 1.71 KB
/
build.xml
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="run" name="TestEveryDay">
<property name="src" value="${basedir}/src" />
<property name="bin" value="${basedir}/bin" />
<property name="lib" value="${basedir}/libs" />
<property name="report" value="${basedir}/test-output" />
<property name="suite" value="${basedir}" />
<property name="debuglevel" value="source,lines,vars" />
<tstamp>
<format property="nowstamp" pattern="yyyyMMdd-HHmmss" locale="en"/>
</tstamp>
<path id="classpath">
<pathelement location="." />
<pathelement location="${bin}"/>
<fileset dir="${lib}/">
<include name="**/*.jar" />
</fileset>
</path>
<path id="sourcepath">
<pathelement location="./src"/>
</path>
<target name="clean">
<delete dir="${bin}" failonerror="No" />
<mkdir dir="${bin}" />
</target>
<target name="build" depends="clean">
<javac srcdir="${src}" debug="true" sourcepathref="sourcepath" debuglevel="${debuglevel}" destdir="${bin}" includeAntRuntime="false" encoding="utf-8">
<classpath refid="classpath" />
</javac>
</target>
<taskdef resource="testngtasks" classpath="${lib}/testng-6.9.9.jar" />
<target name="run" depends="build">
<testng classpathref="classpath"
outputdir="${report}/${nowstamp}"
useDefaultListeners="false"
listeners="org.uncommons.reportng.HTMLReporter,org.uncommons.reportng.JUnitXMLReporter"
failureproperty="test.failed">
<!--xml test suite file -->
<xmlfileset dir="${suite}">
<include name="Suite.xml"/>
</xmlfileset>
<jvmarg value="-Dfile.encoding=UTF-8"/>
</testng>
<fail message="ERROR: One or more tests failed! Check test reports " if="test.failed" />
</target>
</project>