scoutui 2.0.3.56.pre → 2.0.3.57.pre

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,30 +0,0 @@
1
- require_relative '../../lib/scoutui'
2
-
3
- COLORS = [ RED = 0, YELLOW = 1, GREEN = 3]
4
-
5
-
6
- COLORS.each do |x|
7
- puts x
8
- end
9
-
10
-
11
-
12
- puts "RED : #{COLORS[RED]}"
13
-
14
- Scoutui::Logger::LogMgr.instance.setLevel('debug')
15
- Scoutui::Logger::LogMgr.instance.debug "DEBUG - Hello"
16
-
17
- Scoutui::Logger::LogMgr.instance.setLevel('info')
18
- Scoutui::Logger::LogMgr.instance.info "INFO - Hello"
19
-
20
- Scoutui::Logger::LogMgr.instance.setLevel('warn')
21
- Scoutui::Logger::LogMgr.instance.warn "WARN - Hello"
22
-
23
- Scoutui::Logger::LogMgr.instance.setLevel('error')
24
- Scoutui::Logger::LogMgr.instance.error "ERROR - Hello"
25
- Scoutui::Logger::LogMgr.instance.fatal "FATAL - SHOULD SEE THIS"
26
-
27
-
28
- Scoutui::Logger::LogMgr.instance.setLevel('fatal')
29
- Scoutui::Logger::LogMgr.instance.fatal "FATAL - Hello"
30
- Scoutui::Logger::LogMgr.instance.error "ERROR - SHOULD NOT SEE THIS"
@@ -1,10 +0,0 @@
1
- {
2
- "obstacle": {
3
-
4
- "tinymce": {
5
- "locator" : "//*[@id='tinymce']",
6
- "vislble_when": "always"
7
- }
8
-
9
- }
10
- }
@@ -1,103 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
-
4
- ##
5
- # Pre-req - Sauce Connect is running
6
- ##
7
-
8
- setup()
9
- {
10
- HOST="http://the-internet.herokuapp.com/tinymce"
11
-
12
- CAPS="--capabilities ../../common/capabilities/win10.chrome50.json"
13
- CAPS="--capabilities ../capabilities/win10.ff46.json"
14
- # CAPS=
15
- # CAPS="--sauce:browser chrome --sauce:platform \"Windows 10\" --sauce:version 46.0 --sauce:resolution 1024x768"
16
-
17
- USER_ID="terrybrown@commasavvy.com"
18
- PASSWORD="password1"
19
- TESTCFG=../testconfig/test.config.json
20
-
21
-
22
- TITLE="CARMAX"
23
- VIEWPORT="1024x768"
24
-
25
- MODEL="../appmodel/main.nav.json,../appmodel/search_results.json"
26
-
27
- EYES="--eyes --app ${TITLE} --title ${TITLE} --match layout2"
28
- EYES=
29
-
30
- SAUCE="--sauce --sauce_name ${TITLE}"
31
- # SAUCE="--browser chrome"
32
-
33
- CMD="../commands/commands.yml"
34
- CMD="../commands/basic_search.yml"
35
-
36
- CMD="../commands/home.commands.yml"
37
- # CMD="../commands/cud.yml"
38
- }
39
-
40
-
41
-
42
- run1()
43
- {
44
-
45
- EYES=
46
- EYES="--eyes --app ${TITLE}.1280 --title ${TITLE} --match layout2"
47
- VIEWPORT="--viewport 1024x670"
48
- # VIEWPORT="--viewport 1024x722"
49
- VIEWPORT=
50
- # --sauce:platform "Windows 10" --sauce:build SmokeEx --sauce:name Smokes --sauce:browsername "MicrosoftEdge" --sauce:browser "MS Edge 13.10586" --sauce:version "13.10586" --sauce:resolution "1280x1024" \
51
-
52
- ruby $SCOUTUI_BIN \
53
- --config ${TESTCFG} \
54
- --user "expense.admin@scoutui.com" --password password1 --role qa \
55
- --diff /tmp/vt \
56
- --pages ../appmodel/model.json \
57
- --eyes:run false \
58
- --eyes:viewport 1024x670 \
59
- --eyes:app "CarMaxTestApp" \
60
- --eyes:title "CarMaxTitle" \
61
- --sauce:run false \
62
- --sauce:platform "Windows 10" \
63
- --sauce:build SmokeEx \
64
- --sauce:name Smokes \
65
- --sauce:browser "chrome" \
66
- --sauce:version "beta" \
67
- --sauce:resolution "1280x1024" \
68
- --host ${HOST} \
69
- --failfast true \
70
- --loglevel warn \
71
- --report:junit "/tmp/xyz.junit.xml" \
72
- --dut "${CMD}"
73
-
74
- }
75
-
76
- run2()
77
- {
78
-
79
- CAPS="--capabilities ../capabilities/win10.ff46.json"
80
-
81
- ruby $SCOUTUI_BIN \
82
- --config ${TESTCFG} \
83
- --user "expense.admin@scoutui.com" --password password1 \
84
- ${EYES} \
85
- --diff /tmp/vt \
86
- --viewport ${VIEWPORT} \
87
- ${SAUCE} \
88
- ${CAPS} \
89
- --sauce:platform PETER.0 \
90
- --host ${HOST} \
91
- --pages ${MODEL} \
92
- --debug \
93
- --report:junit "/tmp/xyz.xml" \
94
- --dut "${CMD}"
95
-
96
- }
97
-
98
- setup
99
- run1
100
-
101
-
102
-
103
-
@@ -1,114 +0,0 @@
1
- ##
2
- # rspec diff.rb
3
- ##
4
-
5
- require 'test/unit'
6
- require 'eyes_selenium'
7
- require 'httparty'
8
- #require 'selenium-webdriver'
9
-
10
- class MyTest < Test::Unit::TestCase
11
-
12
- def setup
13
- @eyes = Applitools::Eyes.new
14
- # This is your api key, make sure you use it in all your tests.
15
- @eyes.api_key = ENV['APPLITOOLS_API_KEY']
16
- @viewKey = ENV['APPLITOOLS_VIEW_KEY']
17
-
18
- # Get a selenium web driver object.
19
- @driver = Selenium::WebDriver.for :chrome
20
- #Eyes.log_handler = Logger.new(STDOUT)
21
- end
22
-
23
- # Called after every test method runs. Can be used to tear
24
- # down fixture information.
25
-
26
- def teardown
27
- @eyes.abort_if_not_closed
28
- @driver.quit
29
- end
30
-
31
- # Fake test
32
- def test_1
33
- #@eyes.baseline_name='my_test_name'
34
-
35
- wrapped_driver = @eyes.open(
36
- app_name: 'Applitools website',
37
- test_name: 'Example test',
38
- viewport_size: {width: 900, height: 650},
39
- driver: @driver)
40
- wrapped_driver.get 'https://www.applitools.com'
41
- # Visual validation point #1
42
- @eyes.check_window('Main Page')
43
-
44
- wrapped_driver.find_element(:css, ".features>a").click
45
- # Visual validation point #2
46
- @eyes.check_window('Features Page')
47
- results = @eyes.close(false)
48
-
49
- download_diffs(results, @viewKey, '/tmp/vt')
50
- print_results(results, @viewKey)
51
- end
52
-
53
- def print_results(results, view_key)
54
- if results.is_passed
55
- print "Your test was passed!\n"
56
- elsif results.is_new
57
- print "Created new baseline, this is a new test or/and new configuration!"
58
- else
59
- print "Your test was failed!\n"
60
- print "#{results.mismatches} out of #{results.steps} steps failed \n"
61
- print "Here are the failed steps:\n"
62
- session_id = get_session_id(results.url)
63
- batch_id = get_batch_id(results.url)
64
- diff_urls = get_diff_urls(batch_id, session_id, view_key)
65
- diff_urls.each do |index, diff_url|
66
- print "Step #{index} --> #{diff_url} \n"
67
- end
68
- print "For more details please go to #{results.url} to review the differences! \n"
69
- end
70
- end
71
-
72
- def download_diffs(results, view_key, destination)
73
- session_id = get_session_id(results.url)
74
- batch_id = get_batch_id(results.url)
75
- diff_urls = get_diff_urls(batch_id, session_id, view_key)
76
- download_images(diff_urls, destination)
77
- end
78
-
79
- def download_images(diff_urls, destination)
80
- diff_urls.each do |index, url|
81
- File.open("#{destination}/step_#{index}_diff.png", 'wb') do |file|
82
- file.write HTTParty.get(url)
83
- end
84
- end
85
- end
86
-
87
- def get_diff_urls(batch_id, session_id, view_key)
88
- info = "https://eyes.applitools.com/api/sessions/batches/#{batch_id}/#{session_id}/?ApiKey=#{view_key}&format=json"
89
- print "\r\n info:" + info + "\r\n"
90
- diff_template = "https://eyes.applitools.com/api/sessions/batches/#{batch_id}/#{session_id}/steps/%s/diff?ApiKey=#{view_key}"
91
- print "\r\n Template:" + diff_template + "\r\n"
92
- diff_urls = Hash.new
93
- response = HTTParty.get(info)
94
- data = JSON.parse(response.body)
95
- print (data)
96
- index = 1
97
- data['actualAppOutput'].each do |elem|
98
- if (elem['isMatching'] == false)
99
- diff_urls[index] = diff_template % [index]
100
- index+=1
101
- end
102
- end
103
-
104
- diff_urls
105
- end
106
-
107
- def get_session_id(url)
108
- /sessions\/\d+\/(?<sessionId>\d+)/.match(url)[1]
109
- end
110
-
111
- def get_batch_id(url)
112
- /sessions\/(?<batchId>\d+)/.match(url)[1]
113
- end
114
- end
@@ -1,45 +0,0 @@
1
- require_relative './Scout'
2
-
3
- describe "Scout" do
4
-
5
- before :all do
6
- @scout=Scout.new(:firefox)
7
- end
8
-
9
-
10
- describe "should verify M4 is checked" do
11
-
12
- before do
13
- puts (__LINE__).to_s + " before: Open eyes"
14
- # @scout.visit('BMW.M4', 'http://www.bmwusa.com/standard/content/byo/default.aspx?Series=M,4')
15
- @scout.visit('BMW.M4', 'http://www.bmwusa.com/standard/content/byo/default.aspx?Series=4')
16
- end
17
-
18
- after :all do
19
- @scout.close
20
- @scout.report
21
- end
22
-
23
- describe "should be filtered by M4" do
24
-
25
- it "should have 4-series checkboxe enabled" do
26
- m4=@scout.find("//*[@id='seriesBlock']//input[@value='4']")
27
- expect(m4.selected?).to be(true)
28
- end
29
-
30
- end
31
-
32
-
33
- end
34
-
35
-
36
- describe 'Verify UI' do
37
-
38
- it "should pass all visual checks" do
39
- expect(@scout.mismatches==0).to be(true)
40
- end
41
-
42
- end
43
-
44
-
45
- end
data/examples/eyes/ex2.rb DELETED
@@ -1,23 +0,0 @@
1
- require 'eyes_selenium'
2
-
3
- eyes = Applitools::Eyes.new
4
- # This is your api key, make sure you use it in all your tests.
5
- eyes.api_key = 'dHntgIngYlRjYuG5RmdjqOFk106XDCKJplGklCXzjsWjk110'
6
-
7
- # Get a selenium web driver object.
8
- my_webdriver = Selenium::WebDriver.for :firefox
9
-
10
- begin
11
- # Start visual testing using my_webdriver and setting the viewport to 1024x768.
12
- eyes.test(app_name: 'Applitools', test_name: 'Test Web Page',
13
- viewport_size: {width: 1024, height: 768}, driver: my_webdriver) do |driver|
14
- driver.get 'http://www.applitools.com'
15
- # Visual validation point #1
16
- eyes.check_window('Main Page')
17
- driver.find_element(:css, ".features>a").click
18
- # Visual validation point #2
19
- eyes.check_window('Features Page')
20
- end
21
- ensure
22
- my_webdriver.quit
23
- end
@@ -1,372 +0,0 @@
1
- {
2
- "id": "251936793025015",
3
- "batchId": "00000251936793025188",
4
- "batchSessionId": "00000251936793025015",
5
- "runningSessionId": "MDAwMDAyNTE5MzY3OTMwMjUxODg~;MDAwMDAyNTE5MzY3OTMwMjUwMTU~",
6
- "startInfo": {
7
- "sessionType": "Sequential",
8
- "isTransient": false,
9
- "ignoreBaseline": false,
10
- "baselineEnvName": null,
11
- "envName": null,
12
- "appIdOrName": "Login.Francais",
13
- "branchName": null,
14
- "parentBranchName": null,
15
- "scenarioIdOrName": "Login.Francais",
16
- "batchInfo": {
17
- "id": "40c03594-1943-4f89-8cd2-5f338b708fd0",
18
- "name": "Login.Francais",
19
- "startedAt": "2016-06-09T14:29:34-07:00"
20
- },
21
- "environment": {
22
- "inferred": "useragent:Mozilla/5.0 (Windows NT 10.0; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0",
23
- "os": "Windows 10.0",
24
- "hostingApp": "Firefox",
25
- "displaySize": {
26
- "width": 1280,
27
- "height": 1024
28
- }
29
- },
30
- "matchLevel": "Layout",
31
- "defaultMatchSettings": {
32
- "matchLevel": "Layout",
33
- "ignore": [
34
-
35
- ],
36
- "layout": [
37
-
38
- ],
39
- "content": [
40
-
41
- ],
42
- "floating": [
43
-
44
- ],
45
- "splitTopHeight": 0,
46
- "splitBottomHeight": 0,
47
- "exact": null
48
- },
49
- "agentId": "eyes.selenium.ruby/2.30.0"
50
- },
51
- "expectedOutput": [
52
- {
53
- "tag": "Fill Login Form",
54
- "image": {
55
- "id": "se~df8a56d3-fa46-404c-aebe-0ab7a5234bba",
56
- "size": {
57
- "width": 1280,
58
- "height": 1024
59
- }
60
- },
61
- "thumbprint": {
62
- "id": "se~64dccbdb-e9af-440b-aca3-21ce664e3154",
63
- "size": {
64
- "width": 220,
65
- "height": 176
66
- }
67
- },
68
- "matchSettings": {
69
- "matchLevel": "Layout",
70
- "ignore": [
71
- {
72
- "left": 407,
73
- "top": 62,
74
- "width": 873,
75
- "height": 852
76
- },
77
- {
78
- "left": 0,
79
- "top": 501,
80
- "width": 440,
81
- "height": 376
82
- },
83
- {
84
- "left": 199,
85
- "top": 66,
86
- "width": 245,
87
- "height": 101
88
- },
89
- {
90
- "left": 58,
91
- "top": 175,
92
- "width": 294,
93
- "height": 31
94
- },
95
- {
96
- "left": 60,
97
- "top": 245,
98
- "width": 362,
99
- "height": 32
100
- }
101
- ],
102
- "layout": [
103
-
104
- ],
105
- "content": [
106
-
107
- ],
108
- "floating": [
109
-
110
- ],
111
- "splitTopHeight": 0,
112
- "splitBottomHeight": 0,
113
- "exact": null
114
- },
115
- "annotationSettings": null,
116
- "appEnvironment": {
117
- "inferred": "useragent:Mozilla/5.0 (Windows NT 10.0; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0",
118
- "os": "Windows 10.0",
119
- "hostingApp": "Firefox",
120
- "displaySize": {
121
- "width": 1280,
122
- "height": 1024
123
- }
124
- }
125
- },
126
- {
127
- "tag": "SubmitForm LoginForm",
128
- "image": {
129
- "id": "se~a4e2111b-0689-4445-b019-57f6fcebaf76",
130
- "size": {
131
- "width": 1280,
132
- "height": 1024
133
- }
134
- },
135
- "thumbprint": {
136
- "id": "se~338e643a-43ca-4e7f-8001-19f87abae236",
137
- "size": {
138
- "width": 220,
139
- "height": 176
140
- }
141
- },
142
- "matchSettings": {
143
- "matchLevel": "Layout",
144
- "ignore": [
145
-
146
- ],
147
- "layout": [
148
-
149
- ],
150
- "content": [
151
-
152
- ],
153
- "floating": [
154
-
155
- ],
156
- "splitTopHeight": 0,
157
- "splitBottomHeight": 0,
158
- "exact": null
159
- },
160
- "annotationSettings": null,
161
- "appEnvironment": {
162
- "inferred": "useragent:Mozilla/5.0 (Windows NT 10.0; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0",
163
- "os": "Windows 10.0",
164
- "hostingApp": "Firefox",
165
- "displaySize": {
166
- "width": 1280,
167
- "height": 1024
168
- }
169
- }
170
- },
171
- {
172
- "tag": "Landing Page",
173
- "image": {
174
- "id": "se~0525f4d6-6c6b-4fa2-8ac1-3064a66a3ccb",
175
- "size": {
176
- "width": 1263,
177
- "height": 1206
178
- }
179
- },
180
- "thumbprint": {
181
- "id": "se~d9ce0143-ab2d-42f1-b3fe-ab8587b3a077",
182
- "size": {
183
- "width": 209,
184
- "height": 200
185
- }
186
- },
187
- "matchSettings": {
188
- "matchLevel": "Layout",
189
- "ignore": [
190
- {
191
- "left": 1096,
192
- "top": 999,
193
- "width": 167,
194
- "height": 24
195
- },
196
- {
197
- "left": 445,
198
- "top": 740,
199
- "width": 788,
200
- "height": 172
201
- }
202
- ],
203
- "layout": [
204
-
205
- ],
206
- "content": [
207
-
208
- ],
209
- "floating": [
210
-
211
- ],
212
- "splitTopHeight": 0,
213
- "splitBottomHeight": 0,
214
- "exact": null
215
- },
216
- "annotationSettings": null,
217
- "appEnvironment": {
218
- "inferred": "useragent:Mozilla/5.0 (Windows NT 10.0; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0",
219
- "os": "Windows 10.0",
220
- "hostingApp": "Firefox",
221
- "displaySize": {
222
- "width": 1280,
223
- "height": 1024
224
- }
225
- }
226
- }
227
- ],
228
-
229
-
230
-
231
- "actualOutput": [
232
- {
233
- "image": {
234
- "id": "sa~819b8141-a8e2-44d2-9559-fd3c948bf3c7",
235
- "size": {
236
- "width": 1280,
237
- "height": 1024
238
- }
239
- },
240
- "thumbprint": {
241
- "id": "sa~7f3cfc1f-664b-4991-9b9d-2ed8dac4cb59",
242
- "size": {
243
- "width": 220,
244
- "height": 176
245
- }
246
- },
247
- "imageMatchSettings": {
248
- "matchLevel": "Layout",
249
- "ignore": [
250
-
251
- ],
252
- "layout": [
253
-
254
- ],
255
- "content": [
256
-
257
- ],
258
- "floating": [
259
-
260
- ],
261
- "splitTopHeight": 0,
262
- "splitBottomHeight": 0,
263
- "exact": null
264
- },
265
- "ignoreExpectedOutputSettings": false,
266
- "expectedImageId": null,
267
- "expectedThumbprintId": null,
268
- "isMatching": false,
269
- "expectedMatchLevel": "None",
270
- "occurredAt": "2016-06-09T21:30:18.6123465+00:00",
271
- "userInputs": [
272
-
273
- ],
274
- "windowTitle": "Connexion à Concur | Solutions Concur",
275
- "tag": "Fill Login Form",
276
- "isPrimary": false
277
- },
278
- {
279
- "image": {
280
- "id": "sa~c4379ad8-30e3-4674-9225-14cbca4c3822",
281
- "size": {
282
- "width": 1280,
283
- "height": 1024
284
- }
285
- },
286
- "thumbprint": {
287
- "id": "sa~4293cbb4-badf-483b-bcf1-d85c6542e737",
288
- "size": {
289
- "width": 220,
290
- "height": 176
291
- }
292
- },
293
- "imageMatchSettings": {
294
- "matchLevel": "Layout",
295
- "ignore": [
296
-
297
- ],
298
- "layout": [
299
-
300
- ],
301
- "content": [
302
-
303
- ],
304
- "floating": [
305
-
306
- ],
307
- "splitTopHeight": 0,
308
- "splitBottomHeight": 0,
309
- "exact": null
310
- },
311
- "ignoreExpectedOutputSettings": false,
312
- "expectedImageId": null,
313
- "expectedThumbprintId": null,
314
- "isMatching": true,
315
- "expectedMatchLevel": "None",
316
- "occurredAt": "2016-06-09T21:31:05.9962035+00:00",
317
- "userInputs": [
318
-
319
- ],
320
- "windowTitle": "Concur - cliquer. Terminé.",
321
- "tag": "SubmitForm LoginForm",
322
- "isPrimary": false
323
- },
324
- {
325
- "image": {
326
- "id": "sa~b96d917d-0d87-4f40-8d21-0ecddde11a1e",
327
- "size": {
328
- "width": 1263,
329
- "height": 1206
330
- }
331
- },
332
- "thumbprint": {
333
- "id": "sa~34865536-0b04-4af7-993a-51095a41473f",
334
- "size": {
335
- "width": 209,
336
- "height": 200
337
- }
338
- },
339
- "imageMatchSettings": {
340
- "matchLevel": "Layout",
341
- "ignore": [
342
-
343
- ],
344
- "layout": [
345
-
346
- ],
347
- "content": [
348
-
349
- ],
350
- "floating": [
351
-
352
- ],
353
- "splitTopHeight": 0,
354
- "splitBottomHeight": 0,
355
- "exact": null
356
- },
357
- "ignoreExpectedOutputSettings": false,
358
- "expectedImageId": null,
359
- "expectedThumbprintId": null,
360
- "isMatching": false,
361
- "expectedMatchLevel": "None",
362
- "occurredAt": "2016-06-09T21:31:21.4039792+00:00",
363
- "userInputs": [
364
-
365
- ],
366
- "windowTitle": "Accueil",
367
- "tag": "Landing Page",
368
- "isPrimary": false
369
- }
370
- ],
371
- "outputResolution": null
372
- }