scoutui 2.0.5.2.1.pre → 2.0.5.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +6 -2
  3. data/README.md +0 -7
  4. data/examples/ex1/phantom.chrome.json +4 -0
  5. data/examples/ex1/run.sh +85 -0
  6. data/examples/ex1/simple.yml +13 -0
  7. data/examples/ex1/win10.chromebeta.json +6 -0
  8. data/lib/scoutui/base/q_har_mgr.rb +63 -0
  9. data/lib/scoutui/base/test_data.rb +0 -6
  10. data/lib/scoutui/commands/click_object.rb +1 -7
  11. data/lib/scoutui/version.rb +1 -1
  12. data/scoutui.gemspec +3 -4
  13. metadata +17 -62
  14. data/bin/scoutui_driver +0 -1
  15. data/examples/benchmark/ex.rb +0 -16
  16. data/examples/capabilities/win10.chrome46.json +0 -6
  17. data/examples/carmax/appmodel/search_results.json +0 -27
  18. data/examples/carmax/commands/commands.yml +0 -63
  19. data/examples/cmdshell/commands/hello.yml +0 -22
  20. data/examples/converters/jsonupdate.rb +0 -31
  21. data/examples/ex2/appmodel/common.json +0 -51
  22. data/examples/ex2/appmodel/page_model.json +0 -106
  23. data/examples/ex2/appmodel/register.model.json +0 -42
  24. data/examples/ex2/commands/commands.basic.appmodel.yml +0 -8
  25. data/examples/ex2/commands/commands.yml +0 -115
  26. data/examples/ex2/commands/ex1.yml +0 -7
  27. data/examples/ex2/commands/ex1c.yml +0 -8
  28. data/examples/ex2/commands/ex1d.yml +0 -22
  29. data/examples/ex2/commands/ex2.hover.yml +0 -43
  30. data/examples/ex2/commands/ex2.yml +0 -24
  31. data/examples/ex2/data.json +0 -6
  32. data/examples/ex2/test-configs/test.config.basic.json +0 -12
  33. data/examples/ex2/test-configs/test.config.json +0 -31
  34. data/examples/ex2/tests/run-test.sh +0 -125
  35. data/examples/ex2/tests/test-basic-appmodel.sh +0 -14
  36. data/examples/ex2/tests/test-example.sh +0 -39
  37. data/examples/ex2/tests/test-example1a.sh +0 -16
  38. data/examples/ex2/tests/test-example1b.sh +0 -13
  39. data/examples/ex2/tests/test-example1c.sh +0 -15
  40. data/examples/ex2/tests/test-example1d.sh +0 -15
  41. data/examples/ex2/tests/test-example2.forms.eyes.sh +0 -40
  42. data/examples/ex2/tests/test-example2.hover.eyes.sh +0 -40
  43. data/examples/ex2/tests/test-example2.hover.sh +0 -26
  44. data/examples/ex2/tests/test-example2.sh +0 -43
  45. data/examples/ex2/tests/test-example3.sauce.sh +0 -77
  46. data/examples/ex2/tests/test-example3.sh +0 -41
  47. data/examples/headless/run.sh +0 -15
  48. data/examples/http/sendreq.rb +0 -29
  49. data/examples/js.rb +0 -48
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 79f665d31674546b836a69c54d42f019599dc60d
4
- data.tar.gz: 437766733916291e8294325c48a128e8c6886126
3
+ metadata.gz: db798dd9204d670c8e974c52ceb79caf4f341be2
4
+ data.tar.gz: 3fe4396541ad339a40b15b22dd81b73857b868fd
5
5
  SHA512:
6
- metadata.gz: 20457aba30b12e61fafc239f1c7d0321c2b6527cc6f2b16be83adc45db3438f8a6feaaf142fe24229ae99f03ec721645280f240aaf0ccef42fe21ac83f5249f7
7
- data.tar.gz: c118c83030128c9209860bf2405620baddf2ccb4a1d3de839d88caa589456e958bd8007e8ce9da813157ecc90367ee9b904137b3b236ef076b24b426539a04ca
6
+ metadata.gz: 77616d28177972da4e747ce348d05c73d09f26f35021cc5240968590e994442441b5eb477f7bb889132a6a8993ace38111a7906bb02dc248288d91d694654f6a
7
+ data.tar.gz: e0afdb0325c6356a76ffe5c6d95a21c12e91066e68017a7e9dd8787b9ea88d4e4d9563d507bdb698a31fc3537a59f99841489ec2397b2ee2bf2df8d2e4c9c163
data/.gitignore CHANGED
@@ -4,7 +4,11 @@
4
4
  /_yardoc/
5
5
  /coverage/
6
6
  /doc/
7
+ /pkg/
7
8
  /spec/reports/
8
- /test/gateway
9
9
  /tmp/
10
- /test/travel
10
+ /.idea
11
+ /.travis.yml
12
+ assertions.log
13
+ benchmarks.log
14
+ commands.log
data/README.md CHANGED
@@ -59,13 +59,6 @@ To run unit tests:
59
59
  To run a specific unit test:
60
60
 
61
61
  $ rspec spec/json_spec.rb
62
-
63
- To build:
64
-
65
- $ bundle exec rake build
66
-
67
- To push the build (gem)
68
- $ gem push <gem file>
69
62
 
70
63
  ## Running the examples
71
64
 
@@ -0,0 +1,4 @@
1
+ {
2
+ "browser": "phantomjs",
3
+ "useragent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36"
4
+ }
@@ -0,0 +1,85 @@
1
+ #!/usr/bin/env bash
2
+ ##
3
+ # H20Dragon
4
+ ##
5
+
6
+ ##
7
+ # Execute test on Chrome locally.
8
+ ##
9
+ run_chrome()
10
+ {
11
+ CMD=$1
12
+ ruby $SCOUTUI_BIN --config ./test.config.json \
13
+ --browser chrome \
14
+ --host "http://www.elvis-presley.com" \
15
+ --viewport 800x600 \
16
+ --dut ${CMD} --debug
17
+ }
18
+
19
+ ##
20
+ # Execute test on Firefox locally.
21
+ ##
22
+ run_firefox()
23
+ {
24
+ CMD=$1
25
+ ruby $SCOUTUI_BIN --config ./test.config.json \
26
+ --browser firefox \
27
+ --host "http://www.elvis-presley.com" \
28
+ --viewport 800x600 \
29
+ --dut ${CMD} --debug
30
+ }
31
+
32
+ ##
33
+ # Execute test on phantom (GhostDriver)
34
+ ##
35
+ run_headless()
36
+ {
37
+ CMD=$1
38
+ ruby $SCOUTUI_BIN --config ./test.config.json \
39
+ --browser phantomjs \
40
+ --host "http://www.elvis-presley.com" \
41
+ --viewport 800x600 \
42
+ --dut ${CMD} --debug
43
+ }
44
+
45
+
46
+ ##
47
+ # Run tests on ghostdriver (phantom) as defined in
48
+ # its capabilities file.
49
+ ##
50
+ run_headless2()
51
+ {
52
+ CMD=$1
53
+ ruby $SCOUTUI_BIN --config ./test.config.json \
54
+ --capabilities ./phantom.chrome.json \
55
+ --host "http://www.elvis-presley.com" \
56
+ --viewport 800x600 \
57
+ --dut ${CMD} --debug
58
+ }
59
+
60
+
61
+ ##
62
+ # Run a test on ghostdriver (phantom) defined by
63
+ # capabilities files, while taking screen shots.
64
+ ##
65
+ run_screenshots_phantom()
66
+ {
67
+ CMD=$1
68
+ ruby $SCOUTUI_BIN --config ./test.config.json \
69
+ --capabilities ./phantom.chrome.json \
70
+ --screenshots:run true \
71
+ --screenshots:dir /tmp/phantom \
72
+ --host "http://www.elvis-presley.com" \
73
+ --viewport 800x600 \
74
+ --dut ${CMD} --debug
75
+ }
76
+
77
+
78
+
79
+ run_chrome ./simple.yml
80
+ run_firefox ./simple.yml
81
+
82
+ #run_headless ./simple.yml
83
+ #run_headless2 ./simple.yml
84
+ #run_screenshots_phantom ./simple.yml
85
+
@@ -0,0 +1,13 @@
1
+ page:
2
+ name: Home
3
+ action: navigate(http://www.elvis.com)
4
+ ---
5
+ page:
6
+ name: TAB
7
+ action: type(__TAB__)
8
+ do:
9
+ - focused.Highlight
10
+ - press(__TAB__)
11
+ until:
12
+ - true
13
+
@@ -0,0 +1,6 @@
1
+ {
2
+ "platform": "Windows 10",
3
+ "browser": "chrome",
4
+ "version": "beta",
5
+ "screenResolution": "1280x1024"
6
+ }
@@ -0,0 +1,63 @@
1
+ require 'singleton'
2
+ #require 'browsermob/proxy'
3
+
4
+
5
+ module Scoutui::Base
6
+
7
+ class QHarMgr
8
+ include Singleton
9
+
10
+ attr_accessor :proxy_binary
11
+ attr_accessor :proxy
12
+ attr_accessor :seleniumProfile
13
+
14
+
15
+ def initialize()
16
+ puts __FILE__ + (__LINE__).to_s + " -- start BrowserMob --" if Scoutui::Utils::TestUtils.instance.isDebug?
17
+ @proxy_binary = BrowserMob::Proxy::Server.new(ENV['BROWSER_MOB_BIN'], { :port => 8088 })
18
+ end
19
+
20
+ def start()
21
+ puts __FILE__ + (__LINE__).to_s + " --start --"
22
+ @proxy_binary.start
23
+ @proxy = @proxy_binary.create_proxy
24
+ @seleniumProfile = @proxy.selenium_proxy # Needed by Selenium instance
25
+
26
+ @proxy.new_har(:capture_headers => true)
27
+ end
28
+
29
+
30
+ def getSeleniumProfile()
31
+ puts __FILE__ + (__LINE__).to_s + " == getSeleniumProfile() => #{@seleniumProfile} --"
32
+ @seleniumProfile
33
+ end
34
+
35
+ def stop(save_as=nil)
36
+ puts __FILE__ + (__LINE__).to_s + " -- stop(#{save_as.to_s} --"
37
+ # @proxy.close
38
+
39
+ if !save_as.nil?
40
+ @proxy.har.save_to(save_as)
41
+ end
42
+
43
+ @proxy.close
44
+ end
45
+
46
+ def capture_traffic
47
+ # @proxy.new_har
48
+ yield
49
+ @proxy.har
50
+ end
51
+
52
+ def run(n)
53
+ puts __FILE__ + (__LINE__).to_s + " -- run --"
54
+ @har = capture_traffic { yield }
55
+ # @proxy.close
56
+ # @har.save_to(n)
57
+ end
58
+
59
+
60
+ end
61
+
62
+
63
+ end
@@ -1,12 +1,6 @@
1
1
 
2
2
 
3
3
  require 'singleton'
4
-
5
- if Scoutui::VERSION.match(/.*\.pre\s*$/)
6
- puts __FILE__ + (__LINE__).to_s + " Require BETA DataMgr"
7
- gem 'DataMgr', '=0.1.1.1.pre'
8
- end
9
-
10
4
  require 'DataMgr'
11
5
 
12
6
  module Scoutui::Base
@@ -96,13 +96,7 @@ module Scoutui::Commands
96
96
 
97
97
  if isEnabled # && obj.is_a?(Selenium::WebDriver::Element)
98
98
 
99
- begin
100
- @drv.action.move_to(obj).perform
101
- rescue => ex
102
- Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " #{ex.class.to_s}"
103
- Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + ex.backtrace.join("\n\t")
104
- end
105
-
99
+ @drv.action.move_to(obj).perform
106
100
  bm=Benchmark.measure {
107
101
  obj.click
108
102
  }
@@ -1,3 +1,3 @@
1
1
  module Scoutui
2
- VERSION = "2.0.5.2.1.pre"
2
+ VERSION = "2.0.5.3"
3
3
  end
data/scoutui.gemspec CHANGED
@@ -26,15 +26,14 @@ Gem::Specification.new do |spec|
26
26
  spec.add_development_dependency "rake"
27
27
  spec.add_development_dependency "rspec"
28
28
  spec.add_development_dependency "nokogiri", "1.6.7.2"
29
- spec.add_development_dependency "eyes_selenium", ">= 2.38"
29
+ spec.add_development_dependency "eyes_selenium", ">= 2.33"
30
30
  spec.add_development_dependency "selenium-webdriver", "2.53.4"
31
31
  spec.add_development_dependency "httparty", ">=0.13.7"
32
32
  spec.add_development_dependency "json", ">= 1.8.3"
33
33
  spec.add_development_dependency "faker"
34
34
  spec.add_development_dependency "logging"
35
- spec.add_development_dependency "sauce_whisk"
35
+ spec.add_development_dependency "sauce_whisk", "0.0.21"
36
36
  spec.add_development_dependency "testmgr", ">= 0.3.2.pre"
37
- spec.add_development_dependency "tiny_tds"
38
- spec.add_development_dependency "DataMgr", ">= 0.1.1.1.pre"
37
+ spec.add_development_dependency "DataMgr", ">=0.2.0"
39
38
  spec.add_development_dependency "CmdShellMgr", ">= 0.1.1.2.pre"
40
39
  end
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.5.2.1.pre
4
+ version: 2.0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Kim
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-27 00:00:00.000000000 Z
11
+ date: 2017-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '2.38'
75
+ version: '2.33'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '2.38'
82
+ version: '2.33'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: selenium-webdriver
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -154,16 +154,16 @@ dependencies:
154
154
  name: sauce_whisk
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ">="
157
+ - - '='
158
158
  - !ruby/object:Gem::Version
159
- version: '0'
159
+ version: 0.0.21
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ">="
164
+ - - '='
165
165
  - !ruby/object:Gem::Version
166
- version: '0'
166
+ version: 0.0.21
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: testmgr
169
169
  requirement: !ruby/object:Gem::Requirement
@@ -178,34 +178,20 @@ dependencies:
178
178
  - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: 0.3.2.pre
181
- - !ruby/object:Gem::Dependency
182
- name: tiny_tds
183
- requirement: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - ">="
186
- - !ruby/object:Gem::Version
187
- version: '0'
188
- type: :development
189
- prerelease: false
190
- version_requirements: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - ">="
193
- - !ruby/object:Gem::Version
194
- version: '0'
195
181
  - !ruby/object:Gem::Dependency
196
182
  name: DataMgr
197
183
  requirement: !ruby/object:Gem::Requirement
198
184
  requirements:
199
185
  - - ">="
200
186
  - !ruby/object:Gem::Version
201
- version: 0.1.1.1.pre
187
+ version: 0.2.0
202
188
  type: :development
203
189
  prerelease: false
204
190
  version_requirements: !ruby/object:Gem::Requirement
205
191
  requirements:
206
192
  - - ">="
207
193
  - !ruby/object:Gem::Version
208
- version: 0.1.1.1.pre
194
+ version: 0.2.0
209
195
  - !ruby/object:Gem::Dependency
210
196
  name: CmdShellMgr
211
197
  requirement: !ruby/object:Gem::Requirement
@@ -237,48 +223,16 @@ files:
237
223
  - README.md
238
224
  - Rakefile
239
225
  - bin/console
240
- - bin/scoutui_driver
241
226
  - bin/scoutui_driver.rb
242
227
  - bin/setup
243
- - examples/benchmark/ex.rb
244
- - examples/capabilities/win10.chrome46.json
245
- - examples/carmax/appmodel/search_results.json
246
- - examples/carmax/commands/commands.yml
247
- - examples/cmdshell/commands/hello.yml
248
- - examples/converters/jsonupdate.rb
249
228
  - examples/ex1/commands.holidays.yml
250
229
  - examples/ex1/commands.yml
230
+ - examples/ex1/phantom.chrome.json
231
+ - examples/ex1/run.sh
232
+ - examples/ex1/simple.yml
251
233
  - examples/ex1/test-example.sh
252
234
  - examples/ex1/test.config.json
253
- - examples/ex2/appmodel/common.json
254
- - examples/ex2/appmodel/page_model.json
255
- - examples/ex2/appmodel/register.model.json
256
- - examples/ex2/commands/commands.basic.appmodel.yml
257
- - examples/ex2/commands/commands.yml
258
- - examples/ex2/commands/ex1.yml
259
- - examples/ex2/commands/ex1c.yml
260
- - examples/ex2/commands/ex1d.yml
261
- - examples/ex2/commands/ex2.hover.yml
262
- - examples/ex2/commands/ex2.yml
263
- - examples/ex2/data.json
264
- - examples/ex2/test-configs/test.config.basic.json
265
- - examples/ex2/test-configs/test.config.json
266
- - examples/ex2/tests/run-test.sh
267
- - examples/ex2/tests/test-basic-appmodel.sh
268
- - examples/ex2/tests/test-example.sh
269
- - examples/ex2/tests/test-example1a.sh
270
- - examples/ex2/tests/test-example1b.sh
271
- - examples/ex2/tests/test-example1c.sh
272
- - examples/ex2/tests/test-example1d.sh
273
- - examples/ex2/tests/test-example2.forms.eyes.sh
274
- - examples/ex2/tests/test-example2.hover.eyes.sh
275
- - examples/ex2/tests/test-example2.hover.sh
276
- - examples/ex2/tests/test-example2.sh
277
- - examples/ex2/tests/test-example3.sauce.sh
278
- - examples/ex2/tests/test-example3.sh
279
- - examples/headless/run.sh
280
- - examples/http/sendreq.rb
281
- - examples/js.rb
235
+ - examples/ex1/win10.chromebeta.json
282
236
  - lib/scoutui.rb
283
237
  - lib/scoutui/appmodel/q_model.rb
284
238
  - lib/scoutui/base/assertions.rb
@@ -286,6 +240,7 @@ files:
286
240
  - lib/scoutui/base/q_applitools.rb
287
241
  - lib/scoutui/base/q_browser.rb
288
242
  - lib/scoutui/base/q_form.rb
243
+ - lib/scoutui/base/q_har_mgr.rb
289
244
  - lib/scoutui/base/requirements.rb
290
245
  - lib/scoutui/base/test_context.rb
291
246
  - lib/scoutui/base/test_data.rb
@@ -348,9 +303,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
348
303
  version: '0'
349
304
  required_rubygems_version: !ruby/object:Gem::Requirement
350
305
  requirements:
351
- - - ">"
306
+ - - ">="
352
307
  - !ruby/object:Gem::Version
353
- version: 1.3.1
308
+ version: '0'
354
309
  requirements: []
355
310
  rubyforge_project:
356
311
  rubygems_version: 2.6.2
data/bin/scoutui_driver DELETED
@@ -1 +0,0 @@
1
- scoutui_driver.rb
@@ -1,16 +0,0 @@
1
-
2
-
3
-
4
- def foo(opts)
5
-
6
- puts opts
7
-
8
-
9
- end
10
-
11
-
12
-
13
-
14
- foo(rover: 'Rover')
15
-
16
-