This repository has been archived by the owner on Mar 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
/
build.xml
183 lines (160 loc) · 9.44 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<?xml version="1.0" encoding="utf-8"?>
<project name="JsUnit" default="standalone_test" basedir=".">
<!--
The following are the properties used to configure JsUnit. You need to provide values for the mandatory properties.
See the documentation at http://www.jsunit.net for more information.
-->
<property
name="browserFileNames"
value=""
description="browserFileNames is a comma-separated list of browsers in which to run tests when StandaloneTest is invoked on this host. Each value can be a semi-colon separated list, with the second value being the program to run to shut down the browser and the third value being the display name of the browser. The second and third values are optional. For a JsUnit Server, this is a mandatory property. For example: 'c:\program files\internet explorer\iexplore.exe;c:\program files\killie.bat;Internet Explorer 6.0,c:\program files\netscape\netscape7.1\netscp.exe,c:\program files\Opera\runopera.bat'"
/>
<property
id="closeBrowsersAfterTestRuns"
name="closeBrowsersAfterTestRuns"
value=""
description="closeBrowsersAfterTestRuns determines whether to attempt to close browsers after test runs. This is not a mandatory property. The default is true. For example: 'true'"
/>
<property
id="description"
name="description"
value=""
description="description is a human-readable description of a standard or aggregate server. This is not a mandatory property. The default is blank. For example: 'This is our Mac - it's only running Safari right now'"
/>
<property
id="ignoreUnresponsiveRemoteMachines"
name="ignoreUnresponsiveRemoteMachines"
value=""
description="ignoreUnresponsiveRemoteMachines is a property used only by the JsUnit Aggregate Server and the distributed_test target. Its value is whether to ignore a remote machine that does not respond. If true, test runs will be green even if one or more remote machines fail to respond; if false, an unresponsive remote machine results in a failure. This is not a mandatory property. Its default is false. For example: 'true'"
/>
<property
id="logsDirectory"
name="logsDirectory"
value=""
description="logsDirectory is the directory in which the JsUnitStandardServer stores the XML logs produced from tests run. It can be specified relative to the working directory. This is not a mandatory property. If not specified, the directory called 'logs' inside resourceBase is assumed. For example: 'c:\jsunit\java\logs'"
/>
<property
id="port"
name="port"
value=""
description="port is the port on which the JsUnitStandardServer runs. This is not a mandatory property. If not specified, 8080 is assumed. For exapmle: '8080'"
/>
<property
id="remoteMachineURLs"
name="remoteMachineURLs"
value="http://localhost:8080"
description="remoteMachineURLs is a property used only by the JsUnit Aggregate Server and the distributed_test target. Its value is the list of URLs of remote machines to which a request to run tests will be sent. For example: 'http://machine1.company.com:8080,http://localhost:8080,http://192.168.1.200:9090'"
/>
<property
id="resourceBase"
name="resourceBase"
value=""
description="resourceBase is the directory that the JsUnitStandardServer considers to be its document root. It can be specified relative to the working directory. This is not a mandatory property. If not specified, the working directory is assumed. For example: 'c:\jsunit'"
/>
<property
id="timeoutSeconds"
name="timeoutSeconds"
value=""
description="timeoutSeconds is the number of seconds to wait before timing out a browser during a test run. This is not a mandatory property. If not specified, 60 is assumed. For example: '60'"
/>
<property
id="url"
name="url"
value=""
description="url is the URL (HTTP or file protocol) to open in the browser. For a JsUnit Server, this is a mandatory property for a test run if the server is not passed the 'url' parameter. For example: 'http://myhost.mycompany.com:8080/jsunit/testRunner.html?testPage=http://myhost.mycompany.com:8080/jsunit/tests/jsUnitTestSuite.html'"
/>
<property
id="customJsUnitJarPath"
name="customJsUnitJarPath"
value=""
description="Custom path to jsunit.jar file (e.g. if you want to use a Jar outside of lib/bin)."
/>
<property
id="seleniumConfigFilePath"
name="seleniumConfigFilePath"
value="${user.home}/selenium.yml"
description="Location of file containing selenium configuration options."
/>
<property
id="seleniumEnvironment"
name="seleniumEnvironment"
value="local"
description="Stanza within seleniumConfigFile to use."
/>
<property name="bin" location="java/bin"/>
<property name="lib" location="java/lib"/>
<property name="loggingPropertiesFile" location="logging.properties"/>
<path id="classpath">
<fileset dir="${lib}">
<include name="*.jar"/>
<include name="*/*.jar"/>
</fileset>
<fileset dir="${bin}">
<include name="jsunit.jar"/>
</fileset>
<file file="${customJsUnitJarPath}"/>
</path>
<target name="start_server" description="Starts a JsUnit Server">
<java fork="true" classname="net.jsunit.JsUnitServer">
<classpath refid="classpath"/>
<sysproperty key="java.util.logging.config.file" value="${loggingPropertiesFile}"/>
<sysproperty key="browserFileNames" value="${browserFileNames}"/>
<sysproperty key="closeBrowsersAfterTestRuns" value="${closeBrowsersAfterTestRuns}"/>
<sysproperty key="description" value="${description}"/>
<sysproperty key="logsDirectory" value="${logsDirectory}"/>
<sysproperty key="port" value="${port}"/>
<sysproperty key="resourceBase" value="${resourceBase}"/>
<sysproperty key="timeoutSeconds" value="${timeoutSeconds}"/>
<sysproperty key="url" value="${url}"/>
</java>
</target>
<target name="stop_server" description="Stops the JsUnit Server">
<java fork="true" classname="org.mortbay.stop.Main" failonerror="true">
<classpath refid="classpath"/>
</java>
</target>
<target name="standalone_test" description="Runs tests on the local machine">
<junit showoutput="true" haltonerror="true" haltonfailure="true">
<formatter type="plain" usefile="false"/>
<classpath refid="classpath"/>
<sysproperty key="java.util.logging.config.file" value="${loggingPropertiesFile}"/>
<sysproperty key="browserFileNames" value="${browserFileNames}"/>
<sysproperty key="description" value="${description}"/>
<sysproperty key="closeBrowsersAfterTestRuns" value="${closeBrowsersAfterTestRuns}"/>
<sysproperty key="logsDirectory" value="${logsDirectory}"/>
<sysproperty key="port" value="${port}"/>
<sysproperty key="resourceBase" value="${resourceBase}"/>
<sysproperty key="timeoutSeconds" value="${timeoutSeconds}"/>
<sysproperty key="url" value="${url}"/>
<test name="net.jsunit.StandaloneTest"/>
</junit>
</target>
<target name="selenium_test" description="Run tests through Selenium">
<junit showoutput="true" haltonerror="true" haltonfailure="true">
<formatter type="plain" usefile="false"/>
<classpath refid="classpath"/>
<sysproperty key="seleniumConfigFilePath" value="${seleniumConfigFilePath}"/>
<sysproperty key="seleniumEnvironment" value="${seleniumEnvironment}"/>
<sysproperty key="java.util.logging.config.file" value="${loggingPropertiesFile}"/>
<sysproperty key="description" value="${description}"/>
<sysproperty key="logsDirectory" value="${logsDirectory}"/>
<test name="net.jsunit.SeleniumTest"/>
</junit>
</target>
<target name="distributed_test" description="Runs tests on the remote machines">
<junit showoutput="true" haltonerror="true" haltonfailure="true">
<formatter type="plain" usefile="false"/>
<classpath refid="classpath"/>
<sysproperty key="java.util.logging.config.file" value="${loggingPropertiesFile}"/>
<sysproperty key="browserFileNames" value="${browserFileNames}"/>
<sysproperty key="description" value="${description}"/>
<sysproperty key="ignoreUnresponsiveRemoteMachines" value="${ignoreUnresponsiveRemoteMachines}"/>
<sysproperty key="logsDirectory" value="${logsDirectory}"/>
<sysproperty key="port" value="${port}"/>
<sysproperty key="remoteMachineURLs" value="${remoteMachineURLs}"/>
<sysproperty key="resourceBase" value="${resourceBase}"/>
<sysproperty key="url" value="${url}"/>
<test name="net.jsunit.DistributedTest"/>
</junit>
</target>
</project>