scoutui 2.0.3.35.pre → 2.0.3.36.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 540412b6d77e7ccf8ec18334a5dc672ef8a0fd4c
4
- data.tar.gz: e3aea8b02e32686551ee023085d0e821e65fae7b
3
+ metadata.gz: 16709b29bd10eddb83a219bde91ab2defc56528a
4
+ data.tar.gz: ba91491b649bc492162e4e1d705ced251a12fdce
5
5
  SHA512:
6
- metadata.gz: 1601ec8f59c88b6cc09e87777bbad85270d09dc7278d0279b9ae048f6f159bd6f1966a357217194145df82fee99bee6152835cf67c5bbf161e95678e18e509d0
7
- data.tar.gz: 32119b56cc28d8f109e60be5c1a483bc3ff73f900b0ec199bc6c4821725a683a660eb23e226255e87f8affa74f3544dc52557c6b35d894b45b356718b103f6d4
6
+ metadata.gz: 4c1e08dbcc6b0b288bbdd2b3c755ef659fb9b9f0d136a7a3eb7dddec3de27910d5bf830e5e041b6c40bca840cb65490d659d653cfc35c785f49f67c8b93e0da2
7
+ data.tar.gz: 2b78ef3c738b8d9b0cfe7a76c6122effbf09ecc709ab30281c59ae0b867a3668993a1944addbe6e2698a15e39f9ad6bc4019d724de9e51c06ab67b951eca24b8
@@ -0,0 +1,10 @@
1
+ CT_Jobs_Run:
2
+ name: CTE Query I
3
+ description: SQL Query used for Invoice
4
+ query1: use p0170036ou8o_000 select JR_KEY, JD_KEY, STATUS_CODE FROM CT_JOB_RUN WHERE START_TIME > '2013-09-17' AND END_TIME < '2013-10-17'
5
+ query2: use p0170036ou8o_000 select JR_KEY, JD_KEY, STATUS_CODE FROM CT_JOB_RUN WHERE START_TIME > '2013-09-17' AND END_TIME < '2013-10-17'
6
+ ---
7
+ CT_All:
8
+ name: CTE Query I
9
+ description: SQL Query used for Invoice all 2016
10
+ query: use p0170036ou8o_000 select JR_KEY, JD_KEY, STATUS_CODE FROM CT_JOB_RUN WHERE START_TIME > '2016-01-01' AND END_TIME < '2016-0817'
@@ -9,10 +9,12 @@ module Scoutui::Base
9
9
  include Singleton
10
10
 
11
11
  attr_accessor :testware
12
+ attr_accessor :dblist
12
13
  attr_accessor :dut
13
14
 
14
15
  def initialize
15
16
  @testware={}
17
+ @dblist={}
16
18
  end
17
19
 
18
20
  def add(_id, _f)
@@ -22,6 +24,32 @@ module Scoutui::Base
22
24
  Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " => #{@testware[_id]}"
23
25
  end
24
26
 
27
+ def addDB(_id, _f)
28
+ rc=DataMgr::DB.instance.load(_f)
29
+ if rc
30
+ @dblist[_id]={}
31
+ end
32
+ Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " addDB(#{_id}, #{_f}) : #{rc}"
33
+ rc
34
+ end
35
+
36
+ def connectDB(_connectID)
37
+ is_connected=false
38
+ begin
39
+ hit=DataMgr::DB.instance.getConfig(_connectID)
40
+
41
+ puts __FILE__ + (__LINE__).to_s + " ** hit => #{hit}"
42
+ is_connected=DataMgr::DB.instance.connect(_connectID)
43
+
44
+ rescue => ex
45
+ Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " Exception #{ex.class}"
46
+ Scoutui::Logger::LogMgr.instance.debug ex.backtrace
47
+ end
48
+
49
+ Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " connectDB(#{_connectID}) : #{is_connected}"
50
+ is_connected
51
+ end
52
+
25
53
  def addx(_id, _reqs)
26
54
  Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " add(#{_id}, #{_reqs}"
27
55
  @requirements[_id]=_reqs
@@ -26,6 +26,21 @@ module Scoutui::Commands
26
26
  Scoutui::Logger::LogMgr.instance.command.info __FILE__ + (__LINE__).to_s + " | translate : #{_locator}" if Scoutui::Utils::TestUtils.instance.isDebug?
27
27
  obj = Scoutui::Base::QBrowser.findElement(@drv, _locator, Scoutui::Commands::Utils.instance.getFrameSearch(), Scoutui::Commands::Utils.instance.getTimeout)
28
28
  else
29
+
30
+ _val = _condition
31
+
32
+ if _val.match(/^\s*TestData\(.*\)\.getData\(.*\)\s*$/)
33
+
34
+ _dataID=_val.match(/^\s*TestData\((.*)\)\.getData\(.*\)\s*$/)[1].to_s
35
+ _getter=_val.match(/^\s*TestData\((.*)\)\.(getData\(.*\))\s*$/)[2].to_s
36
+
37
+ _v2=Scoutui::Base::TestData.instance.get(_dataID, _getter)
38
+
39
+ puts __FILE__ + (__LINE__).to_s + " getData ==> #{_v2}"
40
+
41
+ _condition=_v2
42
+ end
43
+
29
44
  Scoutui::Base::UserVars.instance.setVar(_uservar, Scoutui::Commands::Utils.instance.expandMacro(_condition))
30
45
  rc=_condition
31
46
  end
@@ -51,6 +51,16 @@ module Scoutui::Commands
51
51
  _c = Scoutui::Commands::Pause.new(nil)
52
52
  _c.execute(e);
53
53
 
54
+ elsif Scoutui::Commands::Utils.instance.isLoadDB?(_action)
55
+ _cmd='loaddb'
56
+ _c = Scoutui::Commands::LoadDB.new(e)
57
+ _c.run(driver: my_driver, dut: e)
58
+
59
+ elsif Scoutui::Commands::Utils.instance.isConnect?(_action)
60
+ _cmd='connect'
61
+ _c = Scoutui::Commands::Connect.new(e)
62
+ _c.run(driver: my_driver, dut: e)
63
+
54
64
  elsif Scoutui::Commands::Utils.instance.isLoadData?(_action)
55
65
  _cmd='loaddata'
56
66
  _c = Scoutui::Commands::LoadData.new(e)
@@ -0,0 +1,84 @@
1
+ require_relative './commands'
2
+
3
+ module Scoutui::Commands
4
+
5
+ class Connect < Command
6
+
7
+
8
+ def hasQuery(e)
9
+ rc=nil
10
+ if e['page'].has_key?('execute') && e['page']['execute'].has_key?('query')
11
+ rc=e['page']['execute']['query'].to_s
12
+ end
13
+ rc
14
+ end
15
+
16
+ def execute(drv, e=nil)
17
+ @drv=drv if !drv.nil?
18
+
19
+ rc=false
20
+ obj=nil
21
+ isConnected=false
22
+ _locator=nil
23
+
24
+ # _req = Scoutui::Utils::TestUtils.instance.getReq() || "DB"
25
+
26
+ begin
27
+
28
+ Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " connect()"
29
+
30
+ if e['page'].has_key?('to')
31
+ isConnected=Scoutui::Base::TestData.instance.connectDB(e['page']['to'])
32
+ Testmgr::TestReport.instance.getReq('DB').testcase('DB').add(isConnected, "Verify connected to DB #{e['page']['to'].to_s}")
33
+ end
34
+
35
+ puts __FILE__ + (__LINE__).to_s + " isConnected : #{isConnected}"
36
+
37
+ _val = hasQuery(e)
38
+ if isConnected && !_val.nil?
39
+
40
+ _q=_val.to_s
41
+ _v2=nil
42
+
43
+ if _val.match(/^\s*TestData\(.*\)\.getData\(.*\)\s*$/)
44
+
45
+ _dataID=_val.match(/^\s*TestData\((.*)\)\.getData\(.*\)\s*$/)[1].to_s
46
+ _getter=_val.match(/^\s*TestData\((.*)\)\.(getData\(.*\))\s*$/)[2].to_s
47
+
48
+ _v2=Scoutui::Base::TestData.instance.get(_dataID, _getter)
49
+ else
50
+ _v2=Scoutui::Base::TestData.instance.normalize(_val)
51
+ end
52
+
53
+ if !_v2.nil?
54
+ puts __FILE__ + (__LINE__).to_s + " getData ==> #{_v2}"
55
+
56
+ DataMgr::DB.instance.run(id: e['page']['to'], query: _v2, report: 'ReportI')
57
+
58
+ result=DataMgr::DB.instance.getResult(id: e['page']['to'], report: 'ReportI')
59
+ puts "*** RESULT : #{result} ***"
60
+ end
61
+
62
+
63
+
64
+ end
65
+
66
+ Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " connect() : #{isConnected}"
67
+ rc=true
68
+
69
+ rescue => ex
70
+ Scoutui::Logger::LogMgr.instance.warn "Error during processing: #{ex}"
71
+ Scoutui::Logger::LogMgr.instance.warn "Backtrace:\n\t#{ex.backtrace.join("\n\t")}"
72
+ end
73
+
74
+ Scoutui::Logger::LogMgr.instance.asserts.info "Verify connect command passed - #{rc}"
75
+ Testmgr::TestReport.instance.getReq('DB').testcase('DB').add(rc, "Verify connect command passed")
76
+
77
+ setResult(rc)
78
+ end
79
+
80
+ end
81
+
82
+
83
+
84
+ end
@@ -26,9 +26,6 @@ module Scoutui::Commands
26
26
 
27
27
  end
28
28
 
29
-
30
-
31
-
32
29
  end
33
30
 
34
31
  rc=true
@@ -0,0 +1,49 @@
1
+ require_relative './commands'
2
+
3
+ module Scoutui::Commands
4
+
5
+ class LoadDB < Command
6
+
7
+
8
+ def execute(drv, e=nil)
9
+ @drv=drv if !drv.nil?
10
+
11
+ rc=false
12
+ obj=nil
13
+ _locator=nil
14
+
15
+ _req = Scoutui::Utils::TestUtils.instance.getReq()
16
+
17
+ begin
18
+
19
+ Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " LoadDB()"
20
+
21
+ if e['page'].has_key?('files')
22
+
23
+ e['page']['files'].each do |_yaml|
24
+ # Scoutui::Base::TestData.instance.addDB(e['page']['name'], _yaml)
25
+ Scoutui::Base::TestData.instance.addDB('SCOUTUI', _yaml)
26
+ end
27
+
28
+ end
29
+
30
+ rc=true
31
+
32
+ rescue => ex
33
+ Scoutui::Logger::LogMgr.instance.warn "Error during processing: #{ex}"
34
+ Scoutui::Logger::LogMgr.instance.warn "Backtrace:\n\t#{ex.backtrace.join("\n\t")}"
35
+ end
36
+
37
+ if rc
38
+ Scoutui::Logger::LogMgr.instance.asserts.info "Verify requirements command passed - #{rc}"
39
+ Testmgr::TestReport.instance.getReq(_req).testcase('click').add(rc, "Verify requirements command passed")
40
+ end
41
+
42
+ setResult(rc)
43
+ end
44
+
45
+ end
46
+
47
+
48
+
49
+ end
@@ -25,6 +25,8 @@ module Scoutui::Commands
25
25
  'type',
26
26
  'click',
27
27
  'loaddata',
28
+ 'connect',
29
+ 'loaddb',
28
30
  'loadrequirements',
29
31
  'mouseover',
30
32
  'navigate',
@@ -257,6 +259,14 @@ module Scoutui::Commands
257
259
  !_action.match(/fillform\(/i).nil?
258
260
  end
259
261
 
262
+ def isConnect?(_action)
263
+ !_action.match(/^\s*connect\s*$/i).nil?
264
+ end
265
+
266
+ def isLoadDB?(_action)
267
+ !_action.match(/^\s*loaddb\s*$/i).nil?
268
+ end
269
+
260
270
  def isLoadData?(_action)
261
271
  !_action.match(/^\s*loaddata\s*$/i).nil?
262
272
  end
@@ -330,6 +340,10 @@ module Scoutui::Commands
330
340
  @totalCommands['click']+=1
331
341
  elsif isMouseOver?(cmd)
332
342
  @totalCommands['mouseover']+=1
343
+ elsif isConnect?(cmd)
344
+ @totalCommands['connect']+=1
345
+ elsif isLoadDB?(cmd)
346
+ @totalCommands['loaddb']+=1
333
347
  elsif isLoadData?(cmd)
334
348
  @totalCommands['loaddata']+=1
335
349
  elsif isLoadRequirements?(cmd)
@@ -264,6 +264,9 @@ module Scoutui::Eyes
264
264
  Testmgr::TestReport.instance.addRequirement('Command')
265
265
  Testmgr::TestReport.instance.getReq('Command').add(Testmgr::TestCase.new('isValid', "isValid"))
266
266
 
267
+ Testmgr::TestReport.instance.addRequirement('DB')
268
+ Testmgr::TestReport.instance.getReq('DB').add(Testmgr::TestCase.new('DB', "DB"))
269
+
267
270
  Testmgr::TestReport.instance.addRequirement('Execution')
268
271
  Testmgr::TestReport.instance.getReq('Execution').add(Testmgr::TestCase.new('Status', "Status"))
269
272
 
@@ -1,3 +1,3 @@
1
1
  module Scoutui
2
- VERSION = "2.0.3.35.pre"
2
+ VERSION = "2.0.3.36.pre"
3
3
  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.3.35.pre
4
+ version: 2.0.3.36.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-08-04 00:00:00.000000000 Z
11
+ date: 2016-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -221,6 +221,7 @@ files:
221
221
  - examples/ci_reporter/ci_example.rb
222
222
  - examples/converters/jsonupdate.rb
223
223
  - examples/converters/jsony.rb
224
+ - examples/data_driven/data/queries.yml
224
225
  - examples/db/sqlclient.rb
225
226
  - examples/ex1/commands.holidays.yml
226
227
  - examples/ex1/commands.yml
@@ -276,11 +277,13 @@ files:
276
277
  - lib/scoutui/commands/click_object.rb
277
278
  - lib/scoutui/commands/command.rb
278
279
  - lib/scoutui/commands/commands.rb
280
+ - lib/scoutui/commands/connect.rb
279
281
  - lib/scoutui/commands/exists_alert.rb
280
282
  - lib/scoutui/commands/fill_form.rb
281
283
  - lib/scoutui/commands/highlight.rb
282
284
  - lib/scoutui/commands/jsalert/action_jsalert.rb
283
285
  - lib/scoutui/commands/load_data.rb
286
+ - lib/scoutui/commands/load_db.rb
284
287
  - lib/scoutui/commands/load_requirements.rb
285
288
  - lib/scoutui/commands/mouse_over.rb
286
289
  - lib/scoutui/commands/pause.rb