forked from seleniumcn/seleniumcn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
57 lines (43 loc) · 1.53 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
55
56
57
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="run" name="Demo">
<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 depends="clean" name="build">
<javac srcdir="${src}" debug="true" sourcepathref="sourcepath" debuglevel="${debuglevel}" destdir="${bin}">
<classpath refid="classpath" />
</javac>
</target>
<taskdef resource="testngtasks" classpath="${lib}/testng-6.8.jar" />
<target name="run" depends="build">
<testng classpathref="classpath"
outputdir="${report}/${nowstamp}"
failureproperty="test.failed">
<!--xml test suite file -->
<xmlfileset dir="${suite}">
<include name="Suite.xml"/>
</xmlfileset>
</testng>
<fail message="ERROR: One or more tests failed! Check test reports " if="test.failed" />
</target>
</project>