Class: Scoutui::Base::TestData
- Inherits:
-
Object
- Object
- Scoutui::Base::TestData
- Includes:
- Singleton
- Defined in:
- lib/scoutui/base/test_data.rb
Instance Attribute Summary collapse
-
#dblist ⇒ Object
Returns the value of attribute dblist.
-
#dut ⇒ Object
Returns the value of attribute dut.
-
#jsList ⇒ Object
Returns the value of attribute jsList.
-
#testware ⇒ Object
Returns the value of attribute testware.
Instance Method Summary collapse
- #add(_id, _f) ⇒ Object
- #addDB(_id, _f) ⇒ Object
- #addJS(_id, _content) ⇒ Object
- #addx(_id, _reqs) ⇒ Object
- #connectDB(_connectID) ⇒ Object
- #get(_id, _locator) ⇒ Object
- #getJS(_id) ⇒ Object
-
#initialize ⇒ TestData
constructor
A new instance of TestData.
Constructor Details
#initialize ⇒ TestData
Returns a new instance of TestData.
16 17 18 19 20 |
# File 'lib/scoutui/base/test_data.rb', line 16 def initialize @testware={} @dblist={} @jsList={} end |
Instance Attribute Details
#dblist ⇒ Object
Returns the value of attribute dblist.
12 13 14 |
# File 'lib/scoutui/base/test_data.rb', line 12 def dblist @dblist end |
#dut ⇒ Object
Returns the value of attribute dut.
13 14 15 |
# File 'lib/scoutui/base/test_data.rb', line 13 def dut @dut end |
#jsList ⇒ Object
Returns the value of attribute jsList.
14 15 16 |
# File 'lib/scoutui/base/test_data.rb', line 14 def jsList @jsList end |
#testware ⇒ Object
Returns the value of attribute testware.
11 12 13 |
# File 'lib/scoutui/base/test_data.rb', line 11 def testware @testware end |
Instance Method Details
#add(_id, _f) ⇒ Object
34 35 36 37 38 39 |
# File 'lib/scoutui/base/test_data.rb', line 34 def add(_id, _f) Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " add(#{_id}, #{_f})" @testware[_id]=DataMgr::DataModel.new(_f) Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " => #{@testware[_id]}" end |
#addDB(_id, _f) ⇒ Object
41 42 43 44 45 46 47 48 |
# File 'lib/scoutui/base/test_data.rb', line 41 def addDB(_id, _f) rc=DataMgr::DB.instance.load(_f) if rc @dblist[_id]={} end Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " addDB(#{_id}, #{_f}) : #{rc}" rc end |
#addJS(_id, _content) ⇒ Object
22 23 24 25 26 |
# File 'lib/scoutui/base/test_data.rb', line 22 def addJS(_id, _content) Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " addJS(#{_id}, #{_content})" @jsList[_id]=_content @jsList[_id] end |
#addx(_id, _reqs) ⇒ Object
67 68 69 70 |
# File 'lib/scoutui/base/test_data.rb', line 67 def addx(_id, _reqs) Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " add(#{_id}, #{_reqs}" @requirements[_id]=_reqs end |
#connectDB(_connectID) ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/scoutui/base/test_data.rb', line 50 def connectDB(_connectID) is_connected=false begin hit=DataMgr::DB.instance.getConfig(_connectID) puts __FILE__ + (__LINE__).to_s + " ** hit => #{hit}" is_connected=DataMgr::DB.instance.connect(_connectID) rescue => ex Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " Exception #{ex.class}" Scoutui::Logger::LogMgr.instance.debug ex.backtrace end Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " connectDB(#{_connectID}) : #{is_connected}" is_connected end |
#get(_id, _locator) ⇒ Object
72 73 74 75 76 |
# File 'lib/scoutui/base/test_data.rb', line 72 def get(_id, _locator) rc=@testware[_id].getDataElement(_locator) Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " get(#{_id}, #{_locator}) : #{rc}" rc end |
#getJS(_id) ⇒ Object
28 29 30 |
# File 'lib/scoutui/base/test_data.rb', line 28 def getJS(_id) @jsList[_id] end |