-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
119 lines (86 loc) · 2.76 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE project [
]>
<project name="CucumberProject" default="usage" basedir=".">
<!-- ========== Initialize Properties =================================== -->
<property environment="env" />
<property name="ws.home" value="${basedir}" />
<property name="ws.jars" value="D:\45h1k\Learning\automation\cucumber\project\Learning-Cucumber\jars\old jar" />
<property name="test.dest" value="${ws.home}/build" />
<property name="test.src" value="${ws.home}/src" />
<path id="testcase.path">
<pathelement location="${test.dest}" />
<fileset dir="${ws.jars}">
<include name="*.jar" />
</fileset>
</path>
<target name="setClassPath" unless="test.classpath">
<path id="classpath_jars">
<fileset dir="${ws.jars}" includes="*.jar" />
</path>
<pathconvert pathsep=":" property="test.classpath" refid="classpath_jars" />
</target>
<target name="init" depends="setClassPath">
<tstamp>
<format property="start.time" pattern="MM/dd/yyyy hh:mm aa" />
</tstamp>
<condition property="ANT" value="${env.ANT_HOME}/bin/ant.bat"
else="${env.ANT_HOME}/bin/ant">
<os family="windows" />
</condition>
</target>
<!-- all -->
<target name="all">
</target>
<!-- clean -->
<target name="clean">
<delete dir="${test.dest}" />
</target>
<!-- compile -->
<target name="compile" depends="clean">
<mkdir dir="${test.dest}" />
<javac srcdir="${test.src}" destdir="${test.dest}" classpathref="testcase.path"
includeantruntime="false" />
<!--copy file="src/log4j.properties" todir="build/"/ -->
</target>
<!-- build -->
<target name="build" depends="init">
</target>
<target name="usage">
<echo>
ant run will execute the test
</echo>
</target>
<path id="test.c">
<fileset dir="${ws.jars}" includes="*.jar" />
</path>
<target name="runcukes" depends="compile">
<mkdir dir="target/cucumber-junit-report" />
<java classname="cucumber.api.cli.Main" fork="true" failonerror="false"
resultproperty="cucumber.exitstatus">
<classpath refid="testcase.path" />
<arg value="--format" />
<arg value="junit:target/cucumber-junit-report/allcukes.xml" />
<arg value="--format" />
<arg value="pretty" />
<arg value="--format" />
<arg value="html:target/cucumber-html-report" />
<arg value="--glue" />
<arg value="cucumberIntro" />
<arg value="src\cucumberIntro" />
</java>
<junitreport todir="target/cucumber-junit-report">
<fileset dir="target/cucumber-junit-report">
<include name="allcukes.xml" />
</fileset>
<report format="frames" todir="target/cucumber-junit-report" />
</junitreport>
<fail message="Cucumber failed">
<condition>
<not>
<equals arg1="${cucumber.exitstatus}" arg2="0" />
</not>
</condition>
</fail>
</target>
</project>