jasmine-selenium-sauce 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,52 @@
1
+ require 'selenium-webdriver'
2
+ require 'json'
3
+
4
+ module Jasmine
5
+ module Sauce
6
+ module CI
7
+ class SeleniumSauceLabsDriver
8
+
9
+ def initialize(sauce_config)
10
+ @driver = create_driver(sauce_config)
11
+ end
12
+
13
+ def create_driver(sauce_config)
14
+ timeout = sauce_config.selenium_client_timeout
15
+ client = Selenium::WebDriver::Remote::Http::Default.new
16
+ client.timeout = timeout
17
+ options = {}
18
+ options[:http_client] = client
19
+ options[:url] = sauce_config.saucelabs_server_url
20
+ options[:desired_capabilities] = generate_capabilities(sauce_config)
21
+ Selenium::WebDriver.for :remote, options
22
+ end
23
+
24
+ def connect(url)
25
+ @driver.navigate.to url
26
+ end
27
+
28
+ def disconnect
29
+ @driver.quit
30
+ end
31
+
32
+ def evaluate_js(script)
33
+ result = @driver.execute_script(script)
34
+ JSON.parse("{\"result\":#{result}}", :max_nesting => false)["result"]
35
+ end
36
+
37
+ def generate_capabilities(sauce_config)
38
+ {
39
+ 'platform' => sauce_config.platform,
40
+ 'browserName' => sauce_config.browser,
41
+ 'browser-version' => sauce_config.browser_version,
42
+ 'record-screenshots' => sauce_config.record_screenshots,
43
+ 'record-video' => sauce_config.record_video,
44
+ 'idle-timeout' => sauce_config.idle_timeout,
45
+ 'max-duration' => sauce_config.max_duration,
46
+ 'name' => "Jasmine"
47
+ }
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,17 @@
1
+ require 'rails/railtie'
2
+
3
+ module Jasmine
4
+ module Sauce
5
+ module CI
6
+
7
+ class Railtie < ::Rails::Railtie
8
+ railtie_name :jasmine_sauce_ci
9
+
10
+ rake_tasks do
11
+ load "jasmine-selenium-sauce/tasks/sauce.rake"
12
+ end
13
+ end
14
+
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ require_relative '../../jasmine-selenium-sauce'
2
+ #require_relative '../../jasmine-selenium-sauce/sauce_config'
3
+
4
+ begin
5
+ config = Jasmine::Sauce::CI::SauceConfig.new
6
+ config.validate
7
+ Jasmine::Sauce::CI::Main.run(config)
8
+ rescue ArgumentError => e
9
+ STDERR << "\nError: #{e.message}\n\n"
10
+ STDERR << "The following environment variables are required:\n"
11
+ STDERR << "\n"
12
+ STDERR << " SAUCELABS_URL - Your SauceLabs OnDemand URL with Basic Auth\n"
13
+ STDERR << " JASMINE_URL - Where your Jasmine tests are hosted\n"
14
+ STDERR << " SAUCE_BROWSER - Which Browser SauceLabs should use\n"
15
+ STDERR << "\n"
16
+ exit -1
17
+ end
@@ -0,0 +1,16 @@
1
+ namespace :jasmine do
2
+
3
+ desc "Run Jasmine via SauceLabs"
4
+ task :sauce do
5
+ require "rspec/core/rake_task"
6
+
7
+ RSpec::Core::RakeTask.new(:jasmine_sauce_runner) do |t|
8
+ t.rspec_opts = ["--colour", "--format", ENV['JASMINE_SPEC_FORMAT'] || "progress"]
9
+ t.verbose = true
10
+ runner_path = File.expand_path(File.join(File.dirname(__FILE__), "rake_runner.rb"))
11
+ t.pattern = [runner_path]
12
+ end
13
+
14
+ Rake::Task["jasmine_sauce_runner"].invoke
15
+ end
16
+ end
@@ -0,0 +1,7 @@
1
+ module Jasmine
2
+ module Sauce
3
+ module Ci
4
+ VERSION = "1.0.0"
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,319 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://username:password@ondemand.saucelabs.com/wd/hub/session
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"desiredCapabilities":{"platform":"VISTA","browserName":"chrome","browser-version":null,"record-screenshots":false,"record-video":false,"idle-timeout":90,"max-duration":180,"name":"Jasmine"}}'
9
+ headers:
10
+ accept:
11
+ - application/json
12
+ content-type:
13
+ - application/json; charset=utf-8
14
+ content-length:
15
+ - '192'
16
+ user-agent:
17
+ - Ruby
18
+ authorization:
19
+ - Basic cGlwZXdpc2U6ZTA3MDkxYzUtZTFhYy00NzRlLWEzZTEtZGRkYjBiOTRmY2Y3
20
+ response:
21
+ status:
22
+ code: 302
23
+ message: Found
24
+ headers:
25
+ transfer-encoding:
26
+ - chunked
27
+ date:
28
+ - Fri, 28 Sep 2012 00:51:51 GMT
29
+ connection:
30
+ - close
31
+ content-type:
32
+ - text/html
33
+ location:
34
+ - http://ondemand.saucelabs.com/wd/hub/session/b784b105070b484d8e651fe477de76bf
35
+ server:
36
+ - monocle/0.17
37
+ body:
38
+ encoding: US-ASCII
39
+ string: ''
40
+ http_version: '1.1'
41
+ recorded_at: Fri, 28 Sep 2012 00:52:20 GMT
42
+ - request:
43
+ method: get
44
+ uri: http://username:password@ondemand.saucelabs.com/wd/hub/session/b784b105070b484d8e651fe477de76bf
45
+ body:
46
+ encoding: US-ASCII
47
+ string: ''
48
+ headers:
49
+ accept:
50
+ - application/json
51
+ user-agent:
52
+ - Ruby
53
+ authorization:
54
+ - Basic cGlwZXdpc2U6ZTA3MDkxYzUtZTFhYy00NzRlLWEzZTEtZGRkYjBiOTRmY2Y3
55
+ response:
56
+ status:
57
+ code: 200
58
+ message: OK
59
+ headers:
60
+ transfer-encoding:
61
+ - chunked
62
+ date:
63
+ - Fri, 28 Sep 2012 00:51:58 GMT
64
+ connection:
65
+ - close
66
+ content-type:
67
+ - application/json;charset=UTF-8
68
+ server:
69
+ - monocle/0.17
70
+ body:
71
+ encoding: US-ASCII
72
+ string: ! '{"status": 0, "sessionId": "b784b105070b484d8e651fe477de76bf", "hCode":
73
+ 2326550, "value": {"rotatable": false, "browserConnectionEnabled": false,
74
+ "acceptSslCerts": false, "cssSelectorsEnabled": true, "javascriptEnabled":
75
+ true, "nativeEvents": true, "databaseEnabled": false, "chrome.chromedriverVersion":
76
+ "21.0.1180.4", "locationContextEnabled": false, "platform": "XP", "browserName":
77
+ "chrome", "takesScreenshot": true, "hasMetadata": true, "version": "21.0.1180.83",
78
+ "applicationCacheEnabled": false, "webStorageEnabled": true, "handlesAlerts":
79
+ true, "chrome.nativeEvents": false}, "class": "org.openqa.selenium.remote.Response"}'
80
+ http_version: '1.1'
81
+ recorded_at: Fri, 28 Sep 2012 00:52:20 GMT
82
+ - request:
83
+ method: post
84
+ uri: http://username:password@ondemand.saucelabs.com/wd/hub/session/b784b105070b484d8e651fe477de76bf/url
85
+ body:
86
+ encoding: UTF-8
87
+ string: ! '{"url":"http://jasmine.server.com/jasmine"}'
88
+ headers:
89
+ accept:
90
+ - application/json
91
+ content-type:
92
+ - application/json; charset=utf-8
93
+ content-length:
94
+ - '45'
95
+ user-agent:
96
+ - Ruby
97
+ authorization:
98
+ - Basic cGlwZXdpc2U6ZTA3MDkxYzUtZTFhYy00NzRlLWEzZTEtZGRkYjBiOTRmY2Y3
99
+ response:
100
+ status:
101
+ code: 204
102
+ message: No Content
103
+ headers:
104
+ date:
105
+ - Fri, 28 Sep 2012 00:51:58 GMT
106
+ connection:
107
+ - close
108
+ content-type:
109
+ - text/plain
110
+ server:
111
+ - monocle/0.17
112
+ body:
113
+ encoding: US-ASCII
114
+ string: ''
115
+ http_version: '1.1'
116
+ recorded_at: Fri, 28 Sep 2012 00:52:46 GMT
117
+ - request:
118
+ method: post
119
+ uri: http://username:password@ondemand.saucelabs.com/wd/hub/session/b784b105070b484d8e651fe477de76bf/execute
120
+ body:
121
+ encoding: UTF-8
122
+ string: ! '{"script":"return jsApiReporter && jsApiReporter.started","args":[]}'
123
+ headers:
124
+ accept:
125
+ - application/json
126
+ content-type:
127
+ - application/json; charset=utf-8
128
+ content-length:
129
+ - '68'
130
+ user-agent:
131
+ - Ruby
132
+ authorization:
133
+ - Basic cGlwZXdpc2U6ZTA3MDkxYzUtZTFhYy00NzRlLWEzZTEtZGRkYjBiOTRmY2Y3
134
+ response:
135
+ status:
136
+ code: 200
137
+ message: OK
138
+ headers:
139
+ transfer-encoding:
140
+ - chunked
141
+ date:
142
+ - Fri, 28 Sep 2012 00:52:24 GMT
143
+ connection:
144
+ - close
145
+ content-type:
146
+ - application/json;charset=UTF-8
147
+ server:
148
+ - monocle/0.17
149
+ body:
150
+ encoding: US-ASCII
151
+ string: ! '{"status": 0, "sessionId": "b784b105070b484d8e651fe477de76bf", "hCode":
152
+ 9110923, "class": "org.openqa.selenium.remote.Response", "value": true}'
153
+ http_version: '1.1'
154
+ recorded_at: Fri, 28 Sep 2012 00:52:46 GMT
155
+ - request:
156
+ method: post
157
+ uri: http://username:password@ondemand.saucelabs.com/wd/hub/session/b784b105070b484d8e651fe477de76bf/execute
158
+ body:
159
+ encoding: UTF-8
160
+ string: ! '{"script":"var result = jsApiReporter.suites(); if (window.Prototype
161
+ && Object.toJSON) { return Object.toJSON(result) } else { return JSON.stringify(result)
162
+ }","args":[]}'
163
+ headers:
164
+ accept:
165
+ - application/json
166
+ content-type:
167
+ - application/json; charset=utf-8
168
+ content-length:
169
+ - '170'
170
+ user-agent:
171
+ - Ruby
172
+ authorization:
173
+ - Basic cGlwZXdpc2U6ZTA3MDkxYzUtZTFhYy00NzRlLWEzZTEtZGRkYjBiOTRmY2Y3
174
+ response:
175
+ status:
176
+ code: 200
177
+ message: OK
178
+ headers:
179
+ transfer-encoding:
180
+ - chunked
181
+ date:
182
+ - Fri, 28 Sep 2012 00:52:24 GMT
183
+ connection:
184
+ - close
185
+ content-type:
186
+ - application/json;charset=UTF-8
187
+ server:
188
+ - monocle/0.17
189
+ body:
190
+ encoding: US-ASCII
191
+ string: ! '{"status": 0, "sessionId": "b784b105070b484d8e651fe477de76bf", "hCode":
192
+ 16658781, "class": "org.openqa.selenium.remote.Response", "value": "[{\"id\":0,\"name\":\"Sample
193
+ Suite\",\"type\":\"suite\",\"children\":[{\"id\":1,\"name\":\"Describe block\",\"type\":\"suite\",\"children\":[{\"id\":0,\"name\":\"simple
194
+ test\",\"type\":\"spec\",\"children\":[]},{\"id\":2,\"name\":\"Nested block\",\"type\":\"suite\",\"children\":[{\"id\":1,\"name\":\"inner
195
+ test\",\"type\":\"spec\",\"children\":[]}]}]},{\"id\":3,\"name\":\"Another
196
+ block\",\"type\":\"suite\",\"children\":[{\"id\":2,\"name\":\"another test\",\"type\":\"spec\",\"children\":[]}]}]}]"}'
197
+ http_version: '1.1'
198
+ recorded_at: Fri, 28 Sep 2012 00:52:46 GMT
199
+ - request:
200
+ method: post
201
+ uri: http://username:password@ondemand.saucelabs.com/wd/hub/session/b784b105070b484d8e651fe477de76bf/execute
202
+ body:
203
+ encoding: UTF-8
204
+ string: ! '{"script":"return jsApiReporter.finished","args":[]}'
205
+ headers:
206
+ accept:
207
+ - application/json
208
+ content-type:
209
+ - application/json; charset=utf-8
210
+ content-length:
211
+ - '52'
212
+ user-agent:
213
+ - Ruby
214
+ authorization:
215
+ - Basic cGlwZXdpc2U6ZTA3MDkxYzUtZTFhYy00NzRlLWEzZTEtZGRkYjBiOTRmY2Y3
216
+ response:
217
+ status:
218
+ code: 200
219
+ message: OK
220
+ headers:
221
+ transfer-encoding:
222
+ - chunked
223
+ date:
224
+ - Fri, 28 Sep 2012 00:52:24 GMT
225
+ connection:
226
+ - close
227
+ content-type:
228
+ - application/json;charset=UTF-8
229
+ server:
230
+ - monocle/0.17
231
+ body:
232
+ encoding: US-ASCII
233
+ string: ! '{"status": 0, "sessionId": "b784b105070b484d8e651fe477de76bf", "hCode":
234
+ 26030331, "class": "org.openqa.selenium.remote.Response", "value": true}'
235
+ http_version: '1.1'
236
+ recorded_at: Fri, 28 Sep 2012 00:52:46 GMT
237
+ - request:
238
+ method: post
239
+ uri: http://username:password@ondemand.saucelabs.com/wd/hub/session/b784b105070b484d8e651fe477de76bf/execute
240
+ body:
241
+ encoding: UTF-8
242
+ string: ! '{"script":"var result = jsApiReporter.resultsForSpecs([0,1,2]); if
243
+ (window.Prototype && Object.toJSON) { return Object.toJSON(result) } else
244
+ { return JSON.stringify(result) }","args":[]}'
245
+ headers:
246
+ accept:
247
+ - application/json
248
+ content-type:
249
+ - application/json; charset=utf-8
250
+ content-length:
251
+ - '186'
252
+ user-agent:
253
+ - Ruby
254
+ authorization:
255
+ - Basic cGlwZXdpc2U6ZTA3MDkxYzUtZTFhYy00NzRlLWEzZTEtZGRkYjBiOTRmY2Y3
256
+ response:
257
+ status:
258
+ code: 200
259
+ message: OK
260
+ headers:
261
+ transfer-encoding:
262
+ - chunked
263
+ date:
264
+ - Fri, 28 Sep 2012 00:52:24 GMT
265
+ connection:
266
+ - close
267
+ content-type:
268
+ - application/json;charset=UTF-8
269
+ server:
270
+ - monocle/0.17
271
+ body:
272
+ encoding: US-ASCII
273
+ string: ! '{"status": 0, "sessionId": "b784b105070b484d8e651fe477de76bf", "hCode":
274
+ 25232872, "class": "org.openqa.selenium.remote.Response", "value": "{\"0\":{\"result\":\"passed\",\"messages\":[{\"passed\":true,\"type\":\"expect\",\"message\":\"Passed.\",\"trace\":{}}]},\"1\":{\"result\":\"failed\",\"messages\":[{\"passed\":false,\"type\":\"expect\",\"message\":\"Expected
275
+ ''false'' to equal ''true''.\",\"trace\":{\"stack\":\"Error: Expected ''false''
276
+ to equal ''true''.\\n at new jasmine.ExpectationResult (http://jasmine.server.com/assets/jasmine.js?body=1:102:32)\\n at
277
+ null.toEqual (http://jasmine.server.com/assets/jasmine.js?body=1:1194:29)\\n at
278
+ null.<anonymous> (http://jasmine.server.com/assets/sample/sample_spec.js?body=1:10:34)\\n at
279
+ jasmine.Block.execute (http://jasmine.server.com/assets/jasmine.js?body=1:1024:15)\\n at
280
+ jasmine.Queue.next_ (http://jasmine.server.com/assets/jasmine.js?body=1:2025:31)\\n at
281
+ jasmine.Queue.start (http://jasmine.server.com/assets/jasmine.js?body=1:1978:8)\\n at
282
+ jasmine.Spec.execute (http://jasmine.server.com/assets/jasmine.js?body=1:2305:14)\\n at
283
+ jasmine.Queue.next_ (http://jasmine.server.com/assets/jasmine.js?body=1:2025:31)\\n at
284
+ jasmine.Queue.start (http://jasmine.server.com/assets/jasmine.js?body=1:1978:8)\\n at
285
+ jasmine.Suite.execute (http://jasmine.server.com/assets/jasmine.js?body=1:2450:14)\"}}]},\"2\":{\"result\":\"passed\",\"messages\":[{\"passed\":true,\"type\":\"expect\",\"message\":\"Passed.\",\"trace\":{}}]}}"}'
286
+ http_version: '1.1'
287
+ recorded_at: Fri, 28 Sep 2012 00:52:46 GMT
288
+ - request:
289
+ method: delete
290
+ uri: http://username:password@ondemand.saucelabs.com/wd/hub/session/b784b105070b484d8e651fe477de76bf
291
+ body:
292
+ encoding: US-ASCII
293
+ string: ''
294
+ headers:
295
+ accept:
296
+ - application/json
297
+ user-agent:
298
+ - Ruby
299
+ authorization:
300
+ - Basic cGlwZXdpc2U6ZTA3MDkxYzUtZTFhYy00NzRlLWEzZTEtZGRkYjBiOTRmY2Y3
301
+ response:
302
+ status:
303
+ code: 204
304
+ message: No Content
305
+ headers:
306
+ date:
307
+ - Fri, 28 Sep 2012 00:52:24 GMT
308
+ connection:
309
+ - close
310
+ content-type:
311
+ - text/plain
312
+ server:
313
+ - monocle/0.17
314
+ body:
315
+ encoding: US-ASCII
316
+ string: ''
317
+ http_version: '1.1'
318
+ recorded_at: Fri, 28 Sep 2012 00:52:48 GMT
319
+ recorded_with: VCR 2.2.5
@@ -0,0 +1,308 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://username:password@ondemand.saucelabs.com/wd/hub/session
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"desiredCapabilities":{"platform":"VISTA","browserName":"chrome","browser-version":null,"record-screenshots":false,"record-video":false,"idle-timeout":90,"max-duration":180,"name":"Jasmine"}}'
9
+ headers:
10
+ accept:
11
+ - application/json
12
+ content-type:
13
+ - application/json; charset=utf-8
14
+ content-length:
15
+ - '192'
16
+ user-agent:
17
+ - Ruby
18
+ authorization:
19
+ - Basic cGlwZXdpc2U6ZTA3MDkxYzUtZTFhYy00NzRlLWEzZTEtZGRkYjBiOTRmY2Y3
20
+ response:
21
+ status:
22
+ code: 302
23
+ message: Found
24
+ headers:
25
+ transfer-encoding:
26
+ - chunked
27
+ date:
28
+ - Fri, 28 Sep 2012 00:40:23 GMT
29
+ connection:
30
+ - close
31
+ content-type:
32
+ - text/html
33
+ location:
34
+ - http://ondemand.saucelabs.com/wd/hub/session/92846a46653d41188f15aaddbb73c94b
35
+ server:
36
+ - monocle/0.17
37
+ body:
38
+ encoding: US-ASCII
39
+ string: ''
40
+ http_version: '1.1'
41
+ recorded_at: Fri, 28 Sep 2012 00:40:52 GMT
42
+ - request:
43
+ method: get
44
+ uri: http://username:password@ondemand.saucelabs.com/wd/hub/session/92846a46653d41188f15aaddbb73c94b
45
+ body:
46
+ encoding: US-ASCII
47
+ string: ''
48
+ headers:
49
+ accept:
50
+ - application/json
51
+ user-agent:
52
+ - Ruby
53
+ authorization:
54
+ - Basic cGlwZXdpc2U6ZTA3MDkxYzUtZTFhYy00NzRlLWEzZTEtZGRkYjBiOTRmY2Y3
55
+ response:
56
+ status:
57
+ code: 200
58
+ message: OK
59
+ headers:
60
+ transfer-encoding:
61
+ - chunked
62
+ date:
63
+ - Fri, 28 Sep 2012 00:40:30 GMT
64
+ connection:
65
+ - close
66
+ content-type:
67
+ - application/json;charset=UTF-8
68
+ server:
69
+ - monocle/0.17
70
+ body:
71
+ encoding: US-ASCII
72
+ string: ! '{"status": 0, "sessionId": "92846a46653d41188f15aaddbb73c94b", "hCode":
73
+ 6530849, "value": {"rotatable": false, "browserConnectionEnabled": false,
74
+ "acceptSslCerts": false, "cssSelectorsEnabled": true, "javascriptEnabled":
75
+ true, "nativeEvents": true, "databaseEnabled": false, "chrome.chromedriverVersion":
76
+ "21.0.1180.4", "locationContextEnabled": false, "platform": "XP", "browserName":
77
+ "chrome", "takesScreenshot": true, "hasMetadata": true, "version": "21.0.1180.83",
78
+ "applicationCacheEnabled": false, "webStorageEnabled": true, "handlesAlerts":
79
+ true, "chrome.nativeEvents": false}, "class": "org.openqa.selenium.remote.Response"}'
80
+ http_version: '1.1'
81
+ recorded_at: Fri, 28 Sep 2012 00:40:52 GMT
82
+ - request:
83
+ method: post
84
+ uri: http://username:password@ondemand.saucelabs.com/wd/hub/session/92846a46653d41188f15aaddbb73c94b/url
85
+ body:
86
+ encoding: UTF-8
87
+ string: ! '{"url":"http://jasmine.server.com/jasmine"}'
88
+ headers:
89
+ accept:
90
+ - application/json
91
+ content-type:
92
+ - application/json; charset=utf-8
93
+ content-length:
94
+ - '45'
95
+ user-agent:
96
+ - Ruby
97
+ authorization:
98
+ - Basic cGlwZXdpc2U6ZTA3MDkxYzUtZTFhYy00NzRlLWEzZTEtZGRkYjBiOTRmY2Y3
99
+ response:
100
+ status:
101
+ code: 204
102
+ message: No Content
103
+ headers:
104
+ date:
105
+ - Fri, 28 Sep 2012 00:40:31 GMT
106
+ connection:
107
+ - close
108
+ content-type:
109
+ - text/plain
110
+ server:
111
+ - monocle/0.17
112
+ body:
113
+ encoding: US-ASCII
114
+ string: ''
115
+ http_version: '1.1'
116
+ recorded_at: Fri, 28 Sep 2012 00:41:17 GMT
117
+ - request:
118
+ method: post
119
+ uri: http://username:password@ondemand.saucelabs.com/wd/hub/session/92846a46653d41188f15aaddbb73c94b/execute
120
+ body:
121
+ encoding: UTF-8
122
+ string: ! '{"script":"return jsApiReporter && jsApiReporter.started","args":[]}'
123
+ headers:
124
+ accept:
125
+ - application/json
126
+ content-type:
127
+ - application/json; charset=utf-8
128
+ content-length:
129
+ - '68'
130
+ user-agent:
131
+ - Ruby
132
+ authorization:
133
+ - Basic cGlwZXdpc2U6ZTA3MDkxYzUtZTFhYy00NzRlLWEzZTEtZGRkYjBiOTRmY2Y3
134
+ response:
135
+ status:
136
+ code: 200
137
+ message: OK
138
+ headers:
139
+ transfer-encoding:
140
+ - chunked
141
+ date:
142
+ - Fri, 28 Sep 2012 00:40:56 GMT
143
+ connection:
144
+ - close
145
+ content-type:
146
+ - application/json;charset=UTF-8
147
+ server:
148
+ - monocle/0.17
149
+ body:
150
+ encoding: US-ASCII
151
+ string: ! '{"status": 0, "sessionId": "92846a46653d41188f15aaddbb73c94b", "hCode":
152
+ 25515818, "class": "org.openqa.selenium.remote.Response", "value": true}'
153
+ http_version: '1.1'
154
+ recorded_at: Fri, 28 Sep 2012 00:41:17 GMT
155
+ - request:
156
+ method: post
157
+ uri: http://username:password@ondemand.saucelabs.com/wd/hub/session/92846a46653d41188f15aaddbb73c94b/execute
158
+ body:
159
+ encoding: UTF-8
160
+ string: ! '{"script":"var result = jsApiReporter.suites(); if (window.Prototype
161
+ && Object.toJSON) { return Object.toJSON(result) } else { return JSON.stringify(result)
162
+ }","args":[]}'
163
+ headers:
164
+ accept:
165
+ - application/json
166
+ content-type:
167
+ - application/json; charset=utf-8
168
+ content-length:
169
+ - '170'
170
+ user-agent:
171
+ - Ruby
172
+ authorization:
173
+ - Basic cGlwZXdpc2U6ZTA3MDkxYzUtZTFhYy00NzRlLWEzZTEtZGRkYjBiOTRmY2Y3
174
+ response:
175
+ status:
176
+ code: 200
177
+ message: OK
178
+ headers:
179
+ transfer-encoding:
180
+ - chunked
181
+ date:
182
+ - Fri, 28 Sep 2012 00:40:56 GMT
183
+ connection:
184
+ - close
185
+ content-type:
186
+ - application/json;charset=UTF-8
187
+ server:
188
+ - monocle/0.17
189
+ body:
190
+ encoding: US-ASCII
191
+ string: ! '{"status": 0, "sessionId": "92846a46653d41188f15aaddbb73c94b", "hCode":
192
+ 18423897, "class": "org.openqa.selenium.remote.Response", "value": "[{\"id\":0,\"name\":\"Sample
193
+ Suite\",\"type\":\"suite\",\"children\":[{\"id\":1,\"name\":\"Describe block\",\"type\":\"suite\",\"children\":[{\"id\":0,\"name\":\"simple
194
+ test\",\"type\":\"spec\",\"children\":[]},{\"id\":2,\"name\":\"Nested block\",\"type\":\"suite\",\"children\":[{\"id\":1,\"name\":\"inner
195
+ test\",\"type\":\"spec\",\"children\":[]}]}]},{\"id\":3,\"name\":\"Another
196
+ block\",\"type\":\"suite\",\"children\":[{\"id\":2,\"name\":\"another test\",\"type\":\"spec\",\"children\":[]}]}]}]"}'
197
+ http_version: '1.1'
198
+ recorded_at: Fri, 28 Sep 2012 00:41:17 GMT
199
+ - request:
200
+ method: post
201
+ uri: http://username:password@ondemand.saucelabs.com/wd/hub/session/92846a46653d41188f15aaddbb73c94b/execute
202
+ body:
203
+ encoding: UTF-8
204
+ string: ! '{"script":"return jsApiReporter.finished","args":[]}'
205
+ headers:
206
+ accept:
207
+ - application/json
208
+ content-type:
209
+ - application/json; charset=utf-8
210
+ content-length:
211
+ - '52'
212
+ user-agent:
213
+ - Ruby
214
+ authorization:
215
+ - Basic cGlwZXdpc2U6ZTA3MDkxYzUtZTFhYy00NzRlLWEzZTEtZGRkYjBiOTRmY2Y3
216
+ response:
217
+ status:
218
+ code: 200
219
+ message: OK
220
+ headers:
221
+ transfer-encoding:
222
+ - chunked
223
+ date:
224
+ - Fri, 28 Sep 2012 00:40:56 GMT
225
+ connection:
226
+ - close
227
+ content-type:
228
+ - application/json;charset=UTF-8
229
+ server:
230
+ - monocle/0.17
231
+ body:
232
+ encoding: US-ASCII
233
+ string: ! '{"status": 0, "sessionId": "92846a46653d41188f15aaddbb73c94b", "hCode":
234
+ 19559385, "class": "org.openqa.selenium.remote.Response", "value": true}'
235
+ http_version: '1.1'
236
+ recorded_at: Fri, 28 Sep 2012 00:41:17 GMT
237
+ - request:
238
+ method: post
239
+ uri: http://username:password@ondemand.saucelabs.com/wd/hub/session/92846a46653d41188f15aaddbb73c94b/execute
240
+ body:
241
+ encoding: UTF-8
242
+ string: ! '{"script":"var result = jsApiReporter.resultsForSpecs([0,1,2]); if
243
+ (window.Prototype && Object.toJSON) { return Object.toJSON(result) } else
244
+ { return JSON.stringify(result) }","args":[]}'
245
+ headers:
246
+ accept:
247
+ - application/json
248
+ content-type:
249
+ - application/json; charset=utf-8
250
+ content-length:
251
+ - '186'
252
+ user-agent:
253
+ - Ruby
254
+ authorization:
255
+ - Basic cGlwZXdpc2U6ZTA3MDkxYzUtZTFhYy00NzRlLWEzZTEtZGRkYjBiOTRmY2Y3
256
+ response:
257
+ status:
258
+ code: 200
259
+ message: OK
260
+ headers:
261
+ transfer-encoding:
262
+ - chunked
263
+ date:
264
+ - Fri, 28 Sep 2012 00:40:56 GMT
265
+ connection:
266
+ - close
267
+ content-type:
268
+ - application/json;charset=UTF-8
269
+ server:
270
+ - monocle/0.17
271
+ body:
272
+ encoding: US-ASCII
273
+ string: ! '{"status": 0, "sessionId": "92846a46653d41188f15aaddbb73c94b", "hCode":
274
+ 24968504, "class": "org.openqa.selenium.remote.Response", "value": "{\"0\":{\"result\":\"passed\",\"messages\":[{\"passed\":true,\"type\":\"expect\",\"message\":\"Passed.\",\"trace\":{}}]},\"1\":{\"result\":\"passed\",\"messages\":[{\"passed\":true,\"type\":\"expect\",\"message\":\"Passed.\",\"trace\":{}}]},\"2\":{\"result\":\"passed\",\"messages\":[{\"passed\":true,\"type\":\"expect\",\"message\":\"Passed.\",\"trace\":{}}]}}"}'
275
+ http_version: '1.1'
276
+ recorded_at: Fri, 28 Sep 2012 00:41:18 GMT
277
+ - request:
278
+ method: delete
279
+ uri: http://username:password@ondemand.saucelabs.com/wd/hub/session/92846a46653d41188f15aaddbb73c94b
280
+ body:
281
+ encoding: US-ASCII
282
+ string: ''
283
+ headers:
284
+ accept:
285
+ - application/json
286
+ user-agent:
287
+ - Ruby
288
+ authorization:
289
+ - Basic cGlwZXdpc2U6ZTA3MDkxYzUtZTFhYy00NzRlLWEzZTEtZGRkYjBiOTRmY2Y3
290
+ response:
291
+ status:
292
+ code: 204
293
+ message: No Content
294
+ headers:
295
+ date:
296
+ - Fri, 28 Sep 2012 00:40:56 GMT
297
+ connection:
298
+ - close
299
+ content-type:
300
+ - text/plain
301
+ server:
302
+ - monocle/0.17
303
+ body:
304
+ encoding: US-ASCII
305
+ string: ''
306
+ http_version: '1.1'
307
+ recorded_at: Fri, 28 Sep 2012 00:41:19 GMT
308
+ recorded_with: VCR 2.2.5