scoutui 2.0.3.24.pre → 2.0.3.25.pre
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.
- checksums.yaml +4 -4
- data/examples/ex6/tests/test.sh +1 -0
- data/lib/scoutui/base/visual_test_framework.rb +16 -4
- data/lib/scoutui/commands/assign_var.rb +19 -13
- data/lib/scoutui/commands/click_object.rb +5 -32
- data/lib/scoutui/commands/command.rb +4 -0
- data/lib/scoutui/commands/mouse_over.rb +1 -3
- data/lib/scoutui/commands/select_object.rb +3 -44
- data/lib/scoutui/commands/type.rb +2 -2
- data/lib/scoutui/eyes/eye_scout.rb +6 -52
- data/lib/scoutui/utils/utils.rb +23 -0
- data/lib/scoutui/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc82c07173e93d9774896bf6ab4e621a00990174
|
4
|
+
data.tar.gz: 108d391194512236200a2abb6d7415643c83b0cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ac17a5606dcc0191b1c28aa6870392bd52571a24182625ad10516e0b385c6d8ed4d42bf1a5c2d101091e505dafc7f3cec1b5f795eeb9e1a795aabae5eb1b8b4
|
7
|
+
data.tar.gz: 33692c0644b4076b37a0ee7f3f38f89f8edbfa792e3263536f5a98e2c24b21db7d9945b62e6d9ac27efae36daca50ba296b0c35324a61464b76dc040ba545fcf
|
data/examples/ex6/tests/test.sh
CHANGED
@@ -737,6 +737,11 @@ module Scoutui::Base
|
|
737
737
|
|
738
738
|
dut_dupes.each do |e|
|
739
739
|
|
740
|
+
if Scoutui::Utils::TestUtils.instance.abort?
|
741
|
+
Scoutui::Logger::LogMgr.instance.error __FILE__ + (__LINE__).to_s + " ABORT"
|
742
|
+
return
|
743
|
+
end
|
744
|
+
|
740
745
|
totalWindows = my_driver.window_handles.length
|
741
746
|
|
742
747
|
Scoutui::Logger::LogMgr.instance.info '-' * 72 if Scoutui::Utils::TestUtils.instance.isDebug?
|
@@ -853,10 +858,8 @@ module Scoutui::Base
|
|
853
858
|
|
854
859
|
if !(_action.nil? || _action.to_s.empty?)
|
855
860
|
|
856
|
-
|
857
|
-
|
858
|
-
Scoutui::Logger::LogMgr.instance.asserts.info "Verify #{_action} is valid - #{Scoutui::Commands::Utils.instance.isValid?(_action).to_s}"
|
859
|
-
Testmgr::TestReport.instance.getReq('Command').get_child('isValid').add(Scoutui::Commands::Utils.instance.isValid?(_action), "Verify #{_action} is valid")
|
861
|
+
Scoutui::Logger::LogMgr.instance.asserts.info "Verify #{_action} is a valid command - #{Scoutui::Commands::Utils.instance.isValid?(_action).to_s}"
|
862
|
+
Testmgr::TestReport.instance.getReq('Command').get_child('isValid').add(Scoutui::Commands::Utils.instance.isValid?(_action), "Verify #{_action} is a valid command")
|
860
863
|
|
861
864
|
begin
|
862
865
|
|
@@ -867,6 +870,10 @@ module Scoutui::Base
|
|
867
870
|
|
868
871
|
_command = eyeScout.getStrategy().processCommand(_action, e)
|
869
872
|
|
873
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " _command.Result => #{_command}, Passed? : #{_command.passed?}"
|
874
|
+
|
875
|
+
|
876
|
+
|
870
877
|
if my_driver.window_handles.length > totalWindows
|
871
878
|
Scoutui::Logger::LogMgr.instance.info "[post-cmd] Total Windows : #{my_driver.window_handles.length.to_s}"
|
872
879
|
end
|
@@ -876,6 +883,11 @@ module Scoutui::Base
|
|
876
883
|
if !_command.wasExecuted?
|
877
884
|
processCommand(_action, e, my_driver)
|
878
885
|
else
|
886
|
+
if Scoutui::Utils::TestUtils.instance.isFailFast? && !_command.passed?
|
887
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " Failfast.";
|
888
|
+
Scoutui::Utils::TestUtils.instance.setState(:abort)
|
889
|
+
return
|
890
|
+
end
|
879
891
|
Scoutui::Logger::LogMgr.instance.warn __FILE__ + (__LINE__).to_s + " Command #{_action} was already executed"
|
880
892
|
end
|
881
893
|
|
@@ -9,6 +9,7 @@ module Scoutui::Commands
|
|
9
9
|
@drv=drv if !drv.nil?
|
10
10
|
rc=nil
|
11
11
|
obj=nil
|
12
|
+
_locator=nil
|
12
13
|
|
13
14
|
_req = Scoutui::Utils::TestUtils.instance.getReq()
|
14
15
|
|
@@ -32,31 +33,36 @@ module Scoutui::Commands
|
|
32
33
|
|
33
34
|
begin
|
34
35
|
|
35
|
-
if
|
36
|
+
if expectObj
|
36
37
|
|
37
38
|
# Refactor in qbrowser
|
38
39
|
|
39
|
-
|
40
|
+
if !obj.nil?
|
40
41
|
|
41
|
-
|
42
|
-
isDisplayed = wait.until {
|
43
|
-
true if obj.displayed?
|
44
|
-
}
|
42
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => Scoutui::Commands::Utils.instance.getTimeout)
|
45
43
|
|
44
|
+
isDisplayed=false
|
45
|
+
isDisplayed = wait.until { obj.displayed? }
|
46
46
|
|
47
|
-
rc = obj.text if _condition.match(/^\s*text/i)
|
48
|
-
rc = obj.attribute('value') if _condition.match(/^\s*value/i)
|
49
|
-
Scoutui::Base::UserVars.instance.setVar(_uservar, rc)
|
50
47
|
|
48
|
+
rc = obj.text if _condition.match(/^\s*text/i)
|
49
|
+
rc = obj.attribute('value') if _condition.match(/^\s*value/i)
|
50
|
+
Scoutui::Base::UserVars.instance.setVar(_uservar, rc)
|
51
51
|
|
52
|
-
puts __FILE__ + (__LINE__).to_s + " rc :: #{Scoutui::Base::UserVars.instance.getVar(_uservar)}"
|
53
52
|
|
54
|
-
|
55
|
-
|
53
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " rc :: #{Scoutui::Base::UserVars.instance.getVar(_uservar)} => #{rc.to_s}"
|
54
|
+
|
55
|
+
if isDisplayed
|
56
|
+
;
|
57
|
+
else
|
58
|
+
Scoutui::Logger::LogMgr.instance.warn __FILE__ + (__LINE__).to_s + " Element, #{_locator} is not displayed."
|
59
|
+
end
|
60
|
+
|
56
61
|
else
|
57
|
-
Scoutui::Logger::LogMgr.instance.
|
62
|
+
Scoutui::Logger::LogMgr.instance.error __FILE__ + (__LINE__).to_s + " assign failed - unable to get element #{_locator}"
|
58
63
|
end
|
59
64
|
|
65
|
+
|
60
66
|
end
|
61
67
|
|
62
68
|
rescue => ex
|
@@ -44,6 +44,7 @@ module Scoutui::Commands
|
|
44
44
|
def execute(drv, e=nil)
|
45
45
|
@drv=drv if !drv.nil?
|
46
46
|
|
47
|
+
bm=nil
|
47
48
|
all_windows = @drv.window_handles.size
|
48
49
|
|
49
50
|
_req = Scoutui::Utils::TestUtils.instance.getReq()
|
@@ -61,36 +62,8 @@ module Scoutui::Commands
|
|
61
62
|
|
62
63
|
begin
|
63
64
|
|
64
|
-
# _frames = Scoutui::Base::QBrowser.getObjectx(@drv, _locator, Scoutui::Commands::Utils.instance.getTimeout)
|
65
|
-
|
66
|
-
if false
|
67
|
-
|
68
|
-
if e.is_a?(Hash) && e.has_key?('page') && e['page'].has_key?('frames')
|
69
|
-
puts __FILE__ + (__LINE__).to_s + " frames => #{e['page']['frames']}";
|
70
|
-
frames=e['page']['frames']
|
71
|
-
frame_list=frames.split(/(frame\(.*\))\.(?=[\w])/)
|
72
|
-
frame_list.each do |_f|
|
73
|
-
|
74
|
-
|
75
|
-
if !_f.empty?
|
76
|
-
_id = _f.match(/frame\((.*)\)/)[1]
|
77
|
-
|
78
|
-
puts __FILE__ + (__LINE__).to_s + " switch_to.frame #{_id}"
|
79
|
-
|
80
|
-
@drv.switch_to.frame(_id.to_s.strip)
|
81
|
-
end
|
82
|
-
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
|
-
obj = Scoutui::Base::QBrowser.getObject(@drv, _locator, Scoutui::Commands::Utils.instance.getTimeout)
|
87
|
-
|
88
|
-
|
89
|
-
end
|
90
|
-
|
91
65
|
obj = Scoutui::Base::QBrowser.findElement(@drv, _locator, Scoutui::Commands::Utils.instance.getFrameSearch(), Scoutui::Commands::Utils.instance.getTimeout)
|
92
66
|
|
93
|
-
|
94
67
|
if obj
|
95
68
|
|
96
69
|
# Refactor in qbrowser
|
@@ -98,9 +71,7 @@ module Scoutui::Commands
|
|
98
71
|
wait = Selenium::WebDriver::Wait.new(:timeout => Scoutui::Commands::Utils.instance.getTimeout)
|
99
72
|
|
100
73
|
isDisplayed=false
|
101
|
-
isDisplayed = wait.until {
|
102
|
-
true if obj.displayed?
|
103
|
-
}
|
74
|
+
isDisplayed = wait.until { obj.displayed? }
|
104
75
|
|
105
76
|
if isDisplayed
|
106
77
|
|
@@ -119,7 +90,8 @@ module Scoutui::Commands
|
|
119
90
|
end
|
120
91
|
|
121
92
|
@drv.action.move_to(obj).perform
|
122
|
-
|
93
|
+
|
94
|
+
bm=Benchmark.measure { obj.click }
|
123
95
|
|
124
96
|
_clicked=true
|
125
97
|
|
@@ -151,6 +123,7 @@ module Scoutui::Commands
|
|
151
123
|
Testmgr::TestReport.instance.getReq(_req).testcase('click').add(!obj.nil?, "Verify object to click exists #{_locator} : #{obj.class.to_s}")
|
152
124
|
Testmgr::TestReport.instance.getReq(_req).testcase('click').add(_clicked, "Verify clicked #{_locator}")
|
153
125
|
|
126
|
+
setBenchmark(bm)
|
154
127
|
setResult(_clicked)
|
155
128
|
end
|
156
129
|
|
@@ -49,7 +49,7 @@ module Scoutui::Commands
|
|
49
49
|
@drv=drv if !drv.nil?
|
50
50
|
|
51
51
|
begin
|
52
|
-
_locator = @cmd.match(
|
52
|
+
_locator = @cmd.match(/^\s*mouseover\s*\((.*)\)/)[1].to_s.strip
|
53
53
|
obj = Scoutui::Base::QBrowser.getObject(@drv, _locator, Scoutui::Commands::Utils.instance.getTimeout)
|
54
54
|
|
55
55
|
if !obj.nil?
|
@@ -92,8 +92,6 @@ module Scoutui::Commands
|
|
92
92
|
|
93
93
|
end
|
94
94
|
|
95
|
-
|
96
|
-
|
97
95
|
end
|
98
96
|
|
99
97
|
rescue => ex
|
@@ -19,8 +19,8 @@ module Scoutui::Commands
|
|
19
19
|
|
20
20
|
if !@cmd.match(/select\(/).nil?
|
21
21
|
|
22
|
-
_xpath = @cmd.match(
|
23
|
-
_val = @cmd.match(
|
22
|
+
_xpath = @cmd.match(/^\s*select\((.*),\s*/)[1].to_s
|
23
|
+
_val = @cmd.match(/^\s*select\(.*,\s*(.*)\)/)[1].to_s
|
24
24
|
|
25
25
|
|
26
26
|
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + "Process SELECT #{_val} into #{_xpath}" if Scoutui::Utils::TestUtils.instance.isDebug?
|
@@ -28,47 +28,6 @@ module Scoutui::Commands
|
|
28
28
|
|
29
29
|
if e.is_a?(Hash) && e.has_key?('page') && e['page'].has_key?('frames')
|
30
30
|
puts __FILE__ + (__LINE__).to_s + " frames => #{e['page']['frames']}";
|
31
|
-
|
32
|
-
|
33
|
-
if false
|
34
|
-
|
35
|
-
frames=e['page']['frames']
|
36
|
-
frame_list=frames.split(/(frame\(.*\))\.(?=[\w])/)
|
37
|
-
frame_list.each do |_f|
|
38
|
-
|
39
|
-
|
40
|
-
if !_f.empty?
|
41
|
-
_id = _f.match(/frame\((.*)\)/)[1]
|
42
|
-
|
43
|
-
puts __FILE__ + (__LINE__).to_s + " switch_to.frame #{_id}"
|
44
|
-
|
45
|
-
@drv.switch_to.frame(_id.to_s.strip)
|
46
|
-
end
|
47
|
-
|
48
|
-
end
|
49
|
-
|
50
|
-
|
51
|
-
end
|
52
|
-
|
53
|
-
end
|
54
|
-
|
55
|
-
|
56
|
-
# obj = Scoutui::Base::QBrowser.getObject(@drv, _xpath, Scoutui::Commands::Utils.instance.getTimeout)
|
57
|
-
|
58
|
-
if false
|
59
|
-
if Scoutui::Commands::Utils.instance.isFrameSearch?
|
60
|
-
hits = Scoutui::Base::QBrowser.frame_getObject(@drv, _xpath, Scoutui::Commands::Utils.instance.getTimeout)
|
61
|
-
|
62
|
-
puts __FILE__ + (__LINE__).to_s + " hits => #{hits.class} : #{hits}"
|
63
|
-
if hits.is_a?(Array) && !hits.empty?
|
64
|
-
obj=hits[0]
|
65
|
-
elsif hits.is_a?(Selenium::WebDriver::Element)
|
66
|
-
obj=hits
|
67
|
-
end
|
68
|
-
|
69
|
-
else
|
70
|
-
obj = Scoutui::Base::QBrowser.getObject(@drv, _xpath, Scoutui::Commands::Utils.instance.getTimeout)
|
71
|
-
end
|
72
31
|
end
|
73
32
|
|
74
33
|
obj = Scoutui::Base::QBrowser.findElement(@drv, _xpath, Scoutui::Commands::Utils.instance.getFrameSearch(), Scoutui::Commands::Utils.instance.getTimeout)
|
@@ -89,7 +48,7 @@ module Scoutui::Commands
|
|
89
48
|
|
90
49
|
# obj.send_keys(Scoutui::Base::UserVars.instance.get(_val))
|
91
50
|
else
|
92
|
-
Scoutui::Logger::LogMgr.instance.
|
51
|
+
Scoutui::Logger::LogMgr.instance.warn __FILE__ + (__LINE__).to_s + " Unable to process command SELECT => #{obj.to_s}"
|
93
52
|
end
|
94
53
|
end
|
95
54
|
|
@@ -77,7 +77,7 @@ module Scoutui::Commands
|
|
77
77
|
obj = Scoutui::Base::QBrowser.findElement(@drv, _xpath, Scoutui::Commands::Utils.instance.getFrameSearch(), Scoutui::Commands::Utils.instance.getTimeout)
|
78
78
|
|
79
79
|
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " type(#{_val})"
|
80
|
-
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " tag : #{obj.tag_name}"
|
80
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " tag : #{obj.tag_name}" if obj.is_a?(Selenium::WebDriver::Element)
|
81
81
|
|
82
82
|
if !obj.nil? &&
|
83
83
|
(obj.tag_name.downcase=='body' ||
|
@@ -155,7 +155,7 @@ module Scoutui::Commands
|
|
155
155
|
end
|
156
156
|
|
157
157
|
else
|
158
|
-
Scoutui::Logger::LogMgr.instance.commands.
|
158
|
+
Scoutui::Logger::LogMgr.instance.commands.warn __FILE__ + (__LINE__).to_s + " Unable to process command TYPE => #{obj.to_s}"
|
159
159
|
end
|
160
160
|
end
|
161
161
|
|
@@ -52,39 +52,7 @@ module Scoutui::Eyes
|
|
52
52
|
accountid.is_a?(Array) ? accountid[0] : accountid
|
53
53
|
end
|
54
54
|
|
55
|
-
def Legacyget_diff_urls(session_id, view_key)
|
56
55
|
|
57
|
-
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + "=== get_diffs_url(#{session_id} ==="
|
58
|
-
|
59
|
-
info = "https://eyes.applitools.com/api/sessions/#{session_id}/?ApiKey=#{view_key}&format=json"
|
60
|
-
diff_template = "https://eyes.applitools.com/api/sessions/#{session_id}/steps/%s/diff?ApiKey=#{view_key}"
|
61
|
-
diff_urls = Hash.new
|
62
|
-
|
63
|
-
Scoutui::Logger::LogMgr.instance.info __FILE__ + (__LINE__).to_s + " info => #{info}"
|
64
|
-
response = HTTParty.get(info)
|
65
|
-
|
66
|
-
Scoutui::Logger::LogMgr.instance.info __FILE__ + (__LINE__).to_s + " RESP => #{response.to_s}"
|
67
|
-
|
68
|
-
begin
|
69
|
-
data = JSON.parse(response.body)
|
70
|
-
index = 1
|
71
|
-
data['actualOutput'].each do |elem|
|
72
|
-
if !elem.nil? && (elem['isMatching'] == false)
|
73
|
-
#diff_urls[index] = diff_template % [index]
|
74
|
-
Scoutui::Logger::LogMgr.instance.info __FILE__ + (__LINE__).to_s + " #{index.to_s} :#{elem['tag'].to_s}"
|
75
|
-
#diff_urls[index] = diff_template % [index]
|
76
|
-
diff_urls[index] = { :tag => elem['tag'].to_s, :url => diff_template % [index] }
|
77
|
-
index+=1
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
diff_urls
|
82
|
-
|
83
|
-
rescue JSON::ParserError
|
84
|
-
;
|
85
|
-
end
|
86
|
-
|
87
|
-
end
|
88
56
|
|
89
57
|
|
90
58
|
def get_diff_urls(session_id, account_id, view_key)
|
@@ -154,26 +122,7 @@ module Scoutui::Eyes
|
|
154
122
|
end
|
155
123
|
end
|
156
124
|
|
157
|
-
def Legacy_saveDiffs(_eyes, results, outdir, view_key)
|
158
|
-
Scoutui::Logger::LogMgr.instance.info __FILE__ + (__LINE__).to_s + " saveDiffs(#{outdir.to_s})"
|
159
|
-
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " | eyesResults => #{results.to_s}"
|
160
|
-
|
161
|
-
Scoutui::Logger::LogMgr.instance.info __FILE__ + (__LINE__).to_s + " | steps : #{results.steps.to_s}"
|
162
|
-
session_id = get_session_id(results.url)
|
163
|
-
Scoutui::Logger::LogMgr.instance.info __FILE__ + (__LINE__).to_s + " session => #{session_id}"
|
164
|
-
|
165
|
-
diffs = Legacyget_diff_urls(session_id, view_key)
|
166
|
-
|
167
|
-
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " diffs => #{diffs}"
|
168
|
-
if diffs.is_a?(Array)
|
169
|
-
diffs.each do |d|
|
170
|
-
Scoutui::Logger::LogMgr.instance.info __FILE__ + (__LINE__).to_s + " #{d.to_s}"
|
171
|
-
end
|
172
125
|
|
173
|
-
download_images(diffs, outdir)
|
174
|
-
end
|
175
|
-
|
176
|
-
end
|
177
126
|
|
178
127
|
def saveDiffs(_eyes, results, outdir, view_key)
|
179
128
|
Scoutui::Logger::LogMgr.instance.info __FILE__ + (__LINE__).to_s + " saveDiffs(#{outdir.to_s})"
|
@@ -215,6 +164,7 @@ module Scoutui::Eyes
|
|
215
164
|
Scoutui::Logger::LogMgr.instance.debug " o " + k.to_s + " : " + v.to_s
|
216
165
|
end
|
217
166
|
|
167
|
+
|
218
168
|
Testmgr::TestReport.instance.getReq("EYES").testcase('Images').add(@testResults.steps.to_i > 0, "Verify at least 1 shot taken (#{@testResults.steps.to_s} shots)")
|
219
169
|
Testmgr::TestReport.instance.getReq("EYES").testcase('Images').add(@testResults.missing.to_i==0, "Verify Eyes did not miss any screens (#{@testResults.missing.to_s} screens)")
|
220
170
|
|
@@ -233,7 +183,6 @@ module Scoutui::Eyes
|
|
233
183
|
Scoutui::Logger::LogMgr.instance.info " Unable to download diff images - APPLITOOLS_VIEW_KEY not defined"
|
234
184
|
end
|
235
185
|
|
236
|
-
|
237
186
|
eyes().abort_if_not_closed if !eyes().nil?
|
238
187
|
end
|
239
188
|
|
@@ -276,6 +225,8 @@ module Scoutui::Eyes
|
|
276
225
|
Scoutui::Logger::LogMgr.instance.info " Eyes.TestResults.Steps : #{@testResults.steps.to_s}"
|
277
226
|
end
|
278
227
|
|
228
|
+
Testmgr::TestReport.instance.getReq("Execution").testcase('Status').add(!Scoutui::Utils::TestUtils.instance.abort?, "Verify execution did not abort.")
|
229
|
+
|
279
230
|
Scoutui::Logger::LogMgr.instance.info " TestReport.Tap => #{@testResults.to_json}"
|
280
231
|
|
281
232
|
Testmgr::TestReport.instance.report()
|
@@ -313,6 +264,9 @@ module Scoutui::Eyes
|
|
313
264
|
Testmgr::TestReport.instance.addRequirement('Command')
|
314
265
|
Testmgr::TestReport.instance.getReq('Command').add(Testmgr::TestCase.new('isValid', "isValid"))
|
315
266
|
|
267
|
+
Testmgr::TestReport.instance.addRequirement('Execution')
|
268
|
+
Testmgr::TestReport.instance.getReq('Execution').add(Testmgr::TestCase.new('Status', "Status"))
|
269
|
+
|
316
270
|
Testmgr::TestReport.instance.getReq('UI').add(Testmgr::TestCase.new('expectJsAlert', 'expectJsAlert'))
|
317
271
|
|
318
272
|
if Scoutui::Utils::TestUtils.instance.isDebug?
|
data/lib/scoutui/utils/utils.rb
CHANGED
@@ -18,6 +18,7 @@ module Scoutui::Utils
|
|
18
18
|
attr_accessor :final_rc
|
19
19
|
|
20
20
|
attr_accessor :coverage
|
21
|
+
attr_accessor :execution_status
|
21
22
|
|
22
23
|
def initialize
|
23
24
|
|
@@ -25,6 +26,8 @@ module Scoutui::Utils
|
|
25
26
|
@final_rc=false
|
26
27
|
@metrics=nil
|
27
28
|
|
29
|
+
@execution_status = :ready
|
30
|
+
|
28
31
|
@env_list={:accounts => 'SCOUTUI_ACCOUNTS', :browser => 'SCOUTUI_BROWSER', :applitools_api_key => 'APPLITOOLS_API_KEY'}
|
29
32
|
@options={}
|
30
33
|
@currentTest={:reqid => 'UI', :testcase => '00' }
|
@@ -44,6 +47,7 @@ module Scoutui::Utils
|
|
44
47
|
@options[:match_level]='layout'
|
45
48
|
@options[:default_wait]=30 # seconds
|
46
49
|
@options[:debug]=false
|
50
|
+
@options[:fail_fast]=false
|
47
51
|
|
48
52
|
@app_model=nil
|
49
53
|
|
@@ -52,6 +56,18 @@ module Scoutui::Utils
|
|
52
56
|
|
53
57
|
end
|
54
58
|
|
59
|
+
def setState(s)
|
60
|
+
@execution_status=s
|
61
|
+
end
|
62
|
+
|
63
|
+
def abort?
|
64
|
+
@execution_status==:abort
|
65
|
+
end
|
66
|
+
|
67
|
+
def getState()
|
68
|
+
@execution_status
|
69
|
+
end
|
70
|
+
|
55
71
|
def getPageCoverage()
|
56
72
|
@coverage[:pages]
|
57
73
|
end
|
@@ -60,6 +76,10 @@ module Scoutui::Utils
|
|
60
76
|
@coverage[:pages] << p
|
61
77
|
end
|
62
78
|
|
79
|
+
def isFailFast?
|
80
|
+
@options[:fail_fast]
|
81
|
+
end
|
82
|
+
|
63
83
|
def getFinalRc()
|
64
84
|
@final_rc
|
65
85
|
end
|
@@ -190,6 +210,8 @@ module Scoutui::Utils
|
|
190
210
|
opt.on('--match [LEVEL]', [:layout2, :layout, :strict, :exact, :content], "Select match level (layout, strict, exact, content)") { |o| @options[:match_level] = o }
|
191
211
|
opt.on('--eyes:match [LEVEL]', [:layout2, :layout, :strict, :exact, :content], "Select match level (layout, strict, exact, content)") { |o| @options[:match_level] = o }
|
192
212
|
|
213
|
+
opt.on('--failfast Bool', [:true, :false]) { |o| @options[:fail_fast] = !o.match(/true/i).nil? }
|
214
|
+
|
193
215
|
opt.on("--pages a,b,c", Array, "List of page models") do |list|
|
194
216
|
Scoutui::Logger::LogMgr.instance.info __FILE__ + (__LINE__).to_s + " list => #{list}"
|
195
217
|
@options[:pages]=list
|
@@ -265,6 +287,7 @@ module Scoutui::Utils
|
|
265
287
|
Scoutui::Logger::LogMgr.instance.info "PageModel file => #{@options[:page_model].to_s}"
|
266
288
|
Scoutui::Logger::LogMgr.instance.info "Sauce.Run => #{@options[:sauce_run].to_s}"
|
267
289
|
Scoutui::Logger::LogMgr.instance.info "Sauce.Platform => #{@options[:sauce_platform].to_s}"
|
290
|
+
Scoutui::Logger::LogMgr.instance.info "Failfast => #{@options[:fail_fast]}"
|
268
291
|
end
|
269
292
|
|
270
293
|
@options
|
data/lib/scoutui/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scoutui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.3.
|
4
|
+
version: 2.0.3.25.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Kim
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|