statt 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data/lib/selenium-grid/Capfile +107 -0
  2. data/lib/selenium-grid/Rakefile +190 -0
  3. data/lib/selenium-grid/build.xml +185 -0
  4. data/lib/selenium-grid/grid_configuration.yml +44 -0
  5. data/lib/selenium-grid/lib/build/common-build.xml +290 -0
  6. data/lib/selenium-grid/lib/selenium-grid-hub-1.0.5-SNAPSHOT.jar +0 -0
  7. data/lib/selenium-grid/lib/selenium-grid-hub-standalone-1.0.5-SNAPSHOT.jar +0 -0
  8. data/lib/selenium-grid/lib/selenium-grid-remote-control-1.0.5-SNAPSHOT.jar +0 -0
  9. data/lib/selenium-grid/lib/selenium-grid-remote-control-standalone-1.0.5-SNAPSHOT.jar +0 -0
  10. data/lib/selenium-grid/lib/selenium-grid-tools-1.0.5-SNAPSHOT.jar +0 -0
  11. data/lib/selenium-grid/lib/selenium-grid-tools-standalone-1.0.5-SNAPSHOT.jar +0 -0
  12. data/lib/selenium-grid/log/hub.log +66 -0
  13. data/lib/selenium-grid/project.properties +4 -0
  14. data/lib/selenium-grid/vendor/commons-logging-1.0.4.jar +0 -0
  15. data/lib/selenium-grid/vendor/selenium-java-client-driver-1.0.1.jar +0 -0
  16. data/lib/selenium-grid/vendor/selenium-server-1.0.1.jar +0 -0
  17. data/lib/statt.rb +5 -5
  18. data/lib/statt/client.rb +26 -18
  19. data/lib/statt/motor.rb +24 -8
  20. metadata +49 -24
  21. data/lib/selenium-grid/examples/ec2/lib/selenium_grid/aws/cloud.rb +0 -35
  22. data/lib/selenium-grid/examples/ec2/lib/selenium_grid/aws/ec2.rb +0 -7
  23. data/lib/selenium-grid/examples/ec2/lib/selenium_grid/aws/ec2_client.rb +0 -62
  24. data/lib/selenium-grid/examples/ec2/lib/selenium_grid/aws/hub.rb +0 -22
  25. data/lib/selenium-grid/examples/ec2/lib/selenium_grid/aws/remote_command.rb +0 -47
  26. data/lib/selenium-grid/examples/ec2/lib/selenium_grid/aws/server.rb +0 -56
  27. data/lib/selenium-grid/examples/ec2/test/unit/all_test.rb +0 -2
  28. data/lib/selenium-grid/examples/ec2/test/unit/cloud_test.rb +0 -27
  29. data/lib/selenium-grid/examples/ec2/test/unit/ec2_client_test.rb +0 -137
  30. data/lib/selenium-grid/examples/ec2/test/unit/hub_test.rb +0 -24
  31. data/lib/selenium-grid/examples/ec2/test/unit/remote_command_test.rb +0 -46
  32. data/lib/selenium-grid/examples/ec2/test/unit/server_test.rb +0 -22
  33. data/lib/selenium-grid/examples/ec2/test/unit/test_helper.rb +0 -4
  34. data/lib/selenium-grid/examples/ruby/flickr_example.rb +0 -16
  35. data/lib/selenium-grid/examples/ruby/lib/array_extension.rb +0 -13
  36. data/lib/selenium-grid/examples/ruby/lib/multi_process_behaviour_runner.rb +0 -28
  37. data/lib/selenium-grid/examples/ruby/paris_spec.rb +0 -34
  38. data/lib/selenium-grid/examples/ruby/perigord_spec.rb +0 -22
  39. data/lib/selenium-grid/examples/ruby/spec_helper.rb +0 -59
  40. data/lib/selenium-grid/sample-scripts/launch-remote-controls.rb +0 -20
@@ -0,0 +1,44 @@
1
+ hub:
2
+ port: 4444
3
+ remoteControlPollingIntervalInSeconds: 180
4
+ sessionMaxIdleTimeInSeconds: 0
5
+ environments:
6
+ - name: "Firefox on Windows"
7
+ browser: "*firefox"
8
+ - name: "Firefox on OS X"
9
+ browser: "*firefox"
10
+ - name: "Firefox on Linux"
11
+ browser: "*firefox"
12
+ - name: "IE on Windows"
13
+ browser: "*iehta"
14
+ - name: "Safari on OS X"
15
+ browser: "*safari"
16
+
17
+ - name: "*firefox"
18
+ browser: "*firefox"
19
+ - name: "*firefox2"
20
+ browser: "*firefox2"
21
+ - name: "*firefox3"
22
+ browser: "*firefox3"
23
+ - name: "*chrome"
24
+ browser: "*chrome"
25
+ - name: "*iexplore"
26
+ browser: "*iexplore"
27
+ - name: "*iehta"
28
+ browser: "*iehta"
29
+ - name: "*safari"
30
+ browser: "*safari"
31
+ - name: "*opera"
32
+ browser: "*opera"
33
+ - name: "*googlechrome"
34
+ browser: "*googlechrome"
35
+ - name: "*firefoxproxy"
36
+ browser: "*firefoxproxy"
37
+ - name: "*pifirefox"
38
+ browser: "*pifirefox"
39
+ - name: "*iexploreproxy"
40
+ browser: "*iexploreproxy"
41
+ - name: "*piiexplore"
42
+ browser: "*piiexplore"
43
+ - name: "*safariproxy"
44
+ browser: "*safariproxy"
@@ -0,0 +1,290 @@
1
+ <project name="Selenium Grid Common Build Tasks">
2
+
3
+ <description>Selenium Grid Common Build Tasks</description>
4
+
5
+ <tstamp/>
6
+
7
+ <property name="build.src" location="src/main/java"/>
8
+ <property name="build.output" location="target/classes"/>
9
+ <property name="dist" location="${basedir}/target/dist"/>
10
+ <property name="test.src" location="src/test/unit/java"/>
11
+ <property name="test.functional.output" location="target/test-functional-classes"/>
12
+ <property name="test.functional.src" location="src/test/functional"/>
13
+ <property name="test.output" location="target/test-classes"/>
14
+ <property name="test.reports" location="target/test-reports"/>
15
+ <property name="metrics.reports" location="target/metrics"/>
16
+ <property name="metrics.pmd.reports" location="${metrics.reports}/pmd"/>
17
+ <property name="metrics.coverage.reports" location="${metrics.reports}/coverage"/>
18
+ <property environment="env"/>
19
+
20
+ <path id="mocking.classpath">
21
+ <fileset dir="${rootdir}/vendor">
22
+ <include name="jbehave-1.0.1.jar"/>
23
+ <include name="jmock-junit4-2.2.0.jar"/>
24
+ <include name="jmock-legacy-2.2.0.jar"/>
25
+ <include name="proxytoys-0.2.1.jar"/>
26
+ <include name="objenesis-1.0.jar"/>
27
+ <include name="jmock-2.2.0.jar"/>
28
+ <include name="cglib-nodep-2.1_3.jar"/>
29
+ </fileset>
30
+ </path>
31
+
32
+ <path id="junit.core.classpath">
33
+ <fileset dir="${rootdir}/vendor">
34
+ <include name="junit-4.7.jar"/>
35
+ </fileset>
36
+ <pathelement location="${build.output}"/>
37
+ <pathelement path="${java.class.path}/"/>
38
+ </path>
39
+
40
+ <path id="junit.classpath" />
41
+
42
+ <path id="unit-testing.classpath">
43
+ <path refid="compile.classpath"/>
44
+ <path refid="junit.core.classpath"/>
45
+ <path refid="junit.classpath"/>
46
+ <path refid="mocking.classpath"/>
47
+ <path refid="cobertura.classpath"/>
48
+ <pathelement location="${build.output}"/>
49
+ <pathelement location="${test.output}"/>
50
+ </path>
51
+
52
+ <path id="functional-testing.classpath">
53
+ <path refid="compile.classpath"/>
54
+ <path refid="junit.core.classpath"/>
55
+ <path refid="junit.classpath"/>
56
+ <path refid="mocking.classpath"/>
57
+ <path refid="cobertura.classpath"/>
58
+ <pathelement location="${build.output}"/>
59
+ <pathelement location="${test.functional.output}"/>
60
+ </path>
61
+
62
+ <path id="pmd.classpath">
63
+ <fileset dir="${rootdir}/vendor">
64
+ <include name="pmd-4.2.2.jar"/>
65
+ <include name="jaxen-1.1.1.jar"/>
66
+ <include name="asm-3.1.jar"/>
67
+ </fileset>
68
+ <pathelement path="${java.class.path}/"/>
69
+ </path>
70
+
71
+ <path id="cobertura.classpath">
72
+ <fileset dir="${rootdir}/vendor">
73
+ <include name="cobertura-1.9.jar"/>
74
+ <include name="log4j-1.2.9.jar"/>
75
+ <include name="asm-2.2.1.jar"/>
76
+ <include name="asm-tree-2.2.1.jar"/>
77
+ <include name="jakarta-oro-2.0.8.jar"/>
78
+ </fileset>
79
+ <pathelement path="${java.class.path}/"/>
80
+ </path>
81
+
82
+ <target name="package-standalone" depends="package"/>
83
+ <target name="build" depends="test"/>
84
+ <target name="dist" depends="package-standalone"/>
85
+
86
+ <target name="clean" description="Remove generated artifacts">
87
+ <delete dir="target"/>
88
+ </target>
89
+
90
+ <target name="compile" description="compile the source ">
91
+ <mkdir dir="${build.output}"/>
92
+ <javac srcdir="${build.src}"
93
+ destdir="${build.output}"
94
+ debug="true"
95
+ source="1.5"
96
+ target="1.5">
97
+ <classpath refid="compile.classpath"/>
98
+ </javac>
99
+ <copy todir="${build.output}" verbose="true">
100
+ <fileset dir="${build.src}" includes="**/*.html"/>
101
+ <fileset dir="${build.src}" includes="**/*.yml"/>
102
+ <fileset dir="${build.src}" includes="**/heartbeat"/>
103
+ </copy>
104
+ </target>
105
+
106
+ <target name="compile-unit-tests" depends="compile" description="compile tests">
107
+ <mkdir dir="${test.output}"/>
108
+ <mkdir dir="${test.reports}"/>
109
+
110
+ <javac srcdir="${test.src}"
111
+ destdir="${test.output}"
112
+ excludes="**/package.html"
113
+ source="1.5"
114
+ target="1.5"
115
+ debug="true"
116
+ deprecation="true">
117
+ <classpath refid="unit-testing.classpath"/>
118
+ </javac>
119
+ </target>
120
+
121
+ <macrodef name="run-unit-tests">
122
+ <element name="options" optional="true"/>
123
+ <sequential>
124
+ <mkdir dir="${test.output}"/>
125
+ <mkdir dir="${test.reports}"/>
126
+
127
+ <copy todir="${test.output}" verbose="true">
128
+ <fileset dir="${test.src}" includes="**/*.html"/>
129
+ </copy>
130
+ <junit printSummary="no" haltonerror="true" haltonfailure="true" fork="true" dir="${test.reports}">
131
+ <options/>
132
+ <classpath refid="unit-testing.classpath"/>
133
+ <formatter type="xml"/>
134
+ <formatter type="plain"/>
135
+ <batchtest todir="${test.reports}">
136
+ <fileset dir="${test.src}">
137
+ <include name="**/*Test.java"/>
138
+ </fileset>
139
+ </batchtest>
140
+ </junit>
141
+ </sequential>
142
+ </macrodef>
143
+
144
+ <target name="compile-functional-tests" depends="compile" description="compile tests">
145
+ <mkdir dir="${test.functional.output}"/>
146
+ <mkdir dir="${test.reports}"/>
147
+
148
+ <javac srcdir="${test.functional.src}"
149
+ destdir="${test.functional.output}"
150
+ excludes="**/package.html"
151
+ source="1.5"
152
+ target="1.5"
153
+ debug="true"
154
+ deprecation="true">
155
+ <classpath refid="functional-testing.classpath"/>
156
+ </javac>
157
+ </target>
158
+
159
+ <macrodef name="run-functional-tests">
160
+ <element name="options" optional="true"/>
161
+ <sequential>
162
+ <mkdir dir="${test.functional.output}"/>
163
+ <mkdir dir="${test.reports}"/>
164
+
165
+ <copy todir="${test.functional.output}" verbose="true">
166
+ <fileset dir="${test.functional.src}" includes="**/*.html"/>
167
+ </copy>
168
+ <junit printSummary="no" haltonerror="true" haltonfailure="true" fork="true" dir="${test.reports}">
169
+ <options/>
170
+ <classpath refid="functional-testing.classpath"/>
171
+ <formatter type="xml"/>
172
+ <formatter type="plain"/>
173
+ <batchtest todir="${test.reports}">
174
+ <fileset dir="${test.functional.src}">
175
+ <include name="**/*Test.java"/>
176
+ </fileset>
177
+ </batchtest>
178
+ </junit>
179
+ </sequential>
180
+ </macrodef>
181
+
182
+ <target name="test-unit" depends="compile, compile-unit-tests" description="run unit tests">
183
+ <run-unit-tests/>
184
+ </target>
185
+
186
+ <target name="test-functional" depends="compile" if="${test.functional.src.exists}"
187
+ description="run functional tests">
188
+ <antcall target="compile-functional-tests" />
189
+ <run-functional-tests />
190
+ </target>
191
+
192
+ <target name="test" depends="test-unit" description="run unit and functional tests" >
193
+ <available file="${test.functional.src}" property="test.functional.src.exists" />
194
+ <antcall target="test-functional" />
195
+ </target>
196
+
197
+ <target name="package" depends="test" description="Package as a jar">
198
+ <mkdir dir="${dist}/lib"/>
199
+ <jar jarfile="${dist}/lib/${artifact}-${version}.jar" basedir="${build.output}">
200
+ <manifest>
201
+ <attribute name="Main-Class" value="com.thoughtworks.selenium.grid.hub.HubServer"/>
202
+ <attribute name="Built-By" value="OpenQA.org"/>
203
+ <attribute name="Build-Time" value="${DSTAMP}${TSTAMP}"/>
204
+ <section name="common">
205
+ <attribute name="Specification-Title" value="${name}"/>
206
+ <attribute name="Specification-Version" value="${version}"/>
207
+ <attribute name="Specification-Vendor" value="OpenQA.org"/>
208
+ </section>
209
+ </manifest>
210
+ </jar>
211
+ </target>
212
+
213
+ <macrodef name="package-standalone-jar">
214
+ <attribute name="main-class"/>
215
+ <element name="dependencies" optional="yes"/>
216
+ <sequential>
217
+ <tstamp/>
218
+ <mkdir dir="${dist}/lib"/>
219
+ <jar jarfile="${dist}/lib/${artifact}-standalone-${version}.jar">
220
+ <manifest>
221
+ <attribute name="Main-Class" value="@{main-class}"/>
222
+ <attribute name="Built-By" value="OpenQA.org"/>
223
+ <attribute name="Build-Time" value="${DSTAMP}${TSTAMP}"/>
224
+ <section name="common">
225
+ <attribute name="Specification-Title" value="${name}"/>
226
+ <attribute name="Specification-Version" value="${version}"/>
227
+ <attribute name="Specification-Vendor" value="OpenQA.org"/>
228
+ </section>
229
+ </manifest>
230
+ <zipfileset src="${dist}/lib/${artifact}-${version}.jar"/>
231
+ <dependencies/>
232
+ </jar>
233
+ </sequential>
234
+ </macrodef>
235
+
236
+ <target name="pmd-analysis" description="Performs Code Analysis using PMD Inspection Tool">
237
+ <echo message="Performing analysis code using PMD"/>
238
+ <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="pmd.classpath"/>
239
+ <mkdir dir="${metrics.pmd.reports}"/>
240
+ <pmd shortFilenames="true">
241
+ <ruleset>lib/build/pmd-ruleset.xml</ruleset>
242
+ <formatter type="html" toFile="${metrics.pmd.reports}/pmd_report.html"
243
+ linkPrefix="http://pmd.sourceforge.net/xref/"/>
244
+ <fileset dir="${build.src}">
245
+ <include name="**/*.java"/>
246
+ </fileset>
247
+ </pmd>
248
+ </target>
249
+
250
+ <target name="coverage-analysis" depends="compile, compile-unit-tests" description="Gather code coverage metrics">
251
+ <taskdef classpathref="cobertura.classpath" resource="tasks.properties" />
252
+
253
+ <delete file="${build.output}/cobertura.ser" />
254
+
255
+ <cobertura-instrument datafile="${build.output}/cobertura.ser">
256
+ <fileset dir="${build.output}">
257
+ <include name="**/*.class"/>
258
+ </fileset>
259
+ </cobertura-instrument>
260
+
261
+ <run-unit-tests>
262
+ <options>
263
+ <sysproperty key="net.sourceforge.cobertura.datafile" file="${build.output}/cobertura.ser" />
264
+ <classpath refid="cobertura.classpath"/>
265
+ </options>
266
+ </run-unit-tests>
267
+
268
+ <cobertura-report srcdir="${build.src}" destdir="${metrics.coverage.reports}" datafile="${build.output}/cobertura.ser"/>
269
+ </target>
270
+
271
+ <macrodef name="build-subprojects">
272
+ <attribute name="target"/>
273
+ <sequential>
274
+ <subant target="@{target}">
275
+ <filelist dir=".">
276
+ <file name="infrastructure/core/build.xml"/>
277
+ <file name="infrastructure/webserver/build.xml"/>
278
+ <file name="hub/build.xml"/>
279
+ <file name="agent/build.xml"/>
280
+ <file name="remote-control/build.xml"/>
281
+ <file name="tools/build.xml"/>
282
+ <file name="demo/build.xml"/>
283
+ <file name="examples/java-testng/build.xml"/>
284
+ <file name="regression-tests"/>
285
+ </filelist>
286
+ </subant>
287
+ </sequential>
288
+ </macrodef>
289
+
290
+ </project>
@@ -0,0 +1,66 @@
1
+ Oct 22, 2009 11:04:02 AM com.thoughtworks.selenium.grid.hub.HubRegistry gridConfiguration
2
+ INFO: Loaded grid configuration:
3
+ ---
4
+ hub:
5
+ environments:
6
+ -
7
+ browser: "*firefox"
8
+ name: Firefox on Windows
9
+ -
10
+ browser: "*firefox"
11
+ name: Firefox on OS X
12
+ -
13
+ browser: "*firefox"
14
+ name: Firefox on Linux
15
+ -
16
+ browser: "*iehta"
17
+ name: IE on Windows
18
+ -
19
+ browser: "*safari"
20
+ name: Safari on OS X
21
+ -
22
+ browser: "*firefox"
23
+ name: "*firefox"
24
+ -
25
+ browser: "*firefox2"
26
+ name: "*firefox2"
27
+ -
28
+ browser: "*firefox3"
29
+ name: "*firefox3"
30
+ -
31
+ browser: "*chrome"
32
+ name: "*chrome"
33
+ -
34
+ browser: "*iexplore"
35
+ name: "*iexplore"
36
+ -
37
+ browser: "*iehta"
38
+ name: "*iehta"
39
+ -
40
+ browser: "*safari"
41
+ name: "*safari"
42
+ -
43
+ browser: "*opera"
44
+ name: "*opera"
45
+ -
46
+ browser: "*googlechrome"
47
+ name: "*googlechrome"
48
+ -
49
+ browser: "*firefoxproxy"
50
+ name: "*firefoxproxy"
51
+ -
52
+ browser: "*pifirefox"
53
+ name: "*pifirefox"
54
+ -
55
+ browser: "*iexploreproxy"
56
+ name: "*iexploreproxy"
57
+ -
58
+ browser: "*piiexplore"
59
+ name: "*piiexplore"
60
+ -
61
+ browser: "*safariproxy"
62
+ name: "*safariproxy"
63
+
64
+ 2009-10-22 11:04:02.933::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
65
+ 2009-10-22 11:04:02.981::INFO: jetty-6.0.x
66
+ 2009-10-22 11:04:03.041::INFO: Started SocketConnector @ 0.0.0.0:4444
@@ -0,0 +1,4 @@
1
+ version=1.0.5-SNAPSHOT
2
+ selenium.version=1.0.1
3
+ rake=rake
4
+
@@ -1,23 +1,23 @@
1
1
  #!/usr/local/bin/ruby -w
2
2
 
3
3
  module Statt
4
- require "selenium"
5
- require "selenium/server_manager"
6
- require "selenium/selenium_server"
4
+ # require "selenium"
5
+ # require "selenium/server_manager"
6
+ # require "selenium/selenium_server"
7
7
 
8
8
  require "net/http"
9
9
  require "yaml"
10
+ require 'rake'
10
11
  require 'selenium-grid/lib/ruby/tcp_socket_extensions'
11
12
  require 'selenium-grid/lib/ruby/file_extensions'
12
13
  require 'selenium-grid/lib/ruby/java/classpath'
13
14
  require 'selenium-grid/lib/ruby/java/vm'
14
15
  require 'selenium-grid/lib/ruby/s_grid/hub'
15
16
  require 'selenium-grid/lib/ruby/s_grid/remote_control'
16
-
17
- gem "selenium-client", ">=1.2.16"
18
17
  require "selenium/client"
19
18
  require 'nokogiri'
20
19
 
21
20
  require 'statt/motor'
22
21
  require 'statt/client'
22
+
23
23
  end