-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
57 lines (56 loc) · 2.01 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
<project name="TestNGTest" default="test" basedir=".">
<!-- Define <testng> task -->
<property name="testdir" location="test" />
<property name="reportdir" location="test-output" />
<property name="srcdir" location="src" />
<property name="xmldir" location="xml" />
<property name="libdir" location="lib" />
<property name="full-compile" value="true" />
<path id="classpath.base" />
<path id="classpath.test">
<fileset dir="${libdir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${libsdir}">
<include name="**/*.jar" />
</fileset>
<pathelement location="${testdir}" />
<pathelement location="${srcdir}" />
<path refid="classpath.base" />
</path>
<taskdef name="testng" classname="org.testng.TestNGAntTask">
<classpath>
<fileset dir="${libdir}">
<include name="**/*.jar" />
</fileset>
</classpath>
</taskdef>
<target name="clean">
<delete verbose="${full-compile}">
<fileset dir="${testdir}" includes="**/*.class" />
</delete>
</target>
<target name="compile" depends="clean">
<javac encoding="utf-8" srcdir="${srcdir}" destdir="${testdir}"
includeantruntime="on" verbose="${full-compile}">
<classpath refid="classpath.test" />
</javac>
</target>
<target name="test" depends="compile">
<testng outputdir="${reportdir}"
classpathref="classpath.test"
haltonfailure="true"
useDefaultListeners="false"
listeners="org.uncommons.reportng.HTMLReporter,org.uncommons.reportng.JUnitXMLReporter">
<xmlfileset dir="${xmldir}" includes="*.xml" />
<sysproperty key="org.uncommons.reportng.title" value="My Test Report121212"/>
</testng>
<!-- <xslt in="${basedir}/test-output/testng-results.xml"
out="${basedir}/test-output/index1.html">
you need to specify the directory here again
<param name="testNgXslt.outputDir" expression="${basedir}/test-output/" />
<classpath refid="classpath.test" />
</xslt> -->
<!-- style="${basedir}/test-output/testng-results.xsl" -->
</target>
</project>