Class: MonitoringTest
- Includes:
- ReportMonitor
- Defined in:
- lib/test_case/monitoring/monitoring_test.rb
Overview
Health Check Test class that will run everything
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#identity ⇒ Object
readonly
Returns the value of attribute identity.
-
#iteration ⇒ Object
readonly
Returns the value of attribute iteration.
-
#job ⇒ Object
readonly
Returns the value of attribute job.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#ssh ⇒ Object
readonly
Returns the value of attribute ssh.
-
#start_time ⇒ Object
readonly
Returns the value of attribute start_time.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#stop_time ⇒ Object
readonly
Returns the value of attribute stop_time.
Instance Method Summary collapse
- #dut ⇒ Object
-
#health ⇒ Object
Should check for video displayed and then check for the guide to init.
-
#initialize(testcase) ⇒ MonitoringTest
constructor
A new instance of MonitoringTest.
- #initialize_monitor(result_hash) ⇒ Object
-
#mac_audit ⇒ Object
Public: The script to run the mac_audit against STB’s.
- #menu ⇒ Object
- #platform ⇒ Object
-
#power ⇒ Object
make sure the device can power on successfully.
- #result_hash ⇒ Object
Methods included from ReportMonitor
#assign_email_params?, #assign_test_params, #confirm_platform, #generate_email_msg, #invalid_report, #log_hash, #send_legacy_err_hash, #set_err_result, #sword_send_results, #take_screenshot
Constructor Details
#initialize(testcase) ⇒ MonitoringTest
Returns a new instance of MonitoringTest.
17 18 19 20 21 22 23 24 |
# File 'lib/test_case/monitoring/monitoring_test.rb', line 17 def initialize(testcase) @test_case = testcase @job = @test_case.job @logger = @test_case.logger @dut = @test_case.dut @host = @test_case.host @identity = @test_case.job end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
26 27 28 |
# File 'lib/test_case/monitoring/monitoring_test.rb', line 26 def host @host end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
26 27 28 |
# File 'lib/test_case/monitoring/monitoring_test.rb', line 26 def id @id end |
#identity ⇒ Object (readonly)
Returns the value of attribute identity.
26 27 28 |
# File 'lib/test_case/monitoring/monitoring_test.rb', line 26 def identity @identity end |
#iteration ⇒ Object (readonly)
Returns the value of attribute iteration.
26 27 28 |
# File 'lib/test_case/monitoring/monitoring_test.rb', line 26 def iteration @iteration end |
#job ⇒ Object (readonly)
Returns the value of attribute job.
26 27 28 |
# File 'lib/test_case/monitoring/monitoring_test.rb', line 26 def job @job end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
26 27 28 |
# File 'lib/test_case/monitoring/monitoring_test.rb', line 26 def logger @logger end |
#ssh ⇒ Object (readonly)
Returns the value of attribute ssh.
26 27 28 |
# File 'lib/test_case/monitoring/monitoring_test.rb', line 26 def ssh @ssh end |
#start_time ⇒ Object (readonly)
Returns the value of attribute start_time.
26 27 28 |
# File 'lib/test_case/monitoring/monitoring_test.rb', line 26 def start_time @start_time end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
26 27 28 |
# File 'lib/test_case/monitoring/monitoring_test.rb', line 26 def status @status end |
#stop_time ⇒ Object (readonly)
Returns the value of attribute stop_time.
26 27 28 |
# File 'lib/test_case/monitoring/monitoring_test.rb', line 26 def stop_time @stop_time end |
Instance Method Details
#dut ⇒ Object
28 29 30 |
# File 'lib/test_case/monitoring/monitoring_test.rb', line 28 def dut @dut end |
#health ⇒ Object
Should check for video displayed and then check for the guide to init.
51 52 53 54 |
# File 'lib/test_case/monitoring/monitoring_test.rb', line 51 def health @logger.warn("Video/guide check") @monitor.check_health end |
#initialize_monitor(result_hash) ⇒ Object
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/test_case/monitoring/monitoring_test.rb', line 75 def initialize_monitor(result_hash) platform = @dut.platform.downcase # Start platformcheck if platform.include?('passport') @logger.warn('Passport run') @monitor = PassportMonitor.new(@test_case, result_hash) elsif platform.include?('spectrum') @logger.warn('Spectrum run') @monitor = SpecMonitor.new(@test_case, result_hash) elsif platform.include?('odn') @logger.warn('ODN run') @monitor = OdnMonitor.new(@test_case, result_hash) elsif platform.include?('roku') @logger.warn('Roku run') @monitor = RokuMonitor.new(@test_case, result_hash) elsif platform.include?('iguide') @logger.warn('iguide run') @monitor = IguideMonitor.new(@test_case, result_hash) elsif platform.include?('apple') @logger.warn('apple run') @monitor = AppleMonitor.new(@test_case, result_hash) elsif platform.include?('sara') @logger.warn('sara run') @monitor = SaraMonitor.new(@test_case, result_hash) elsif platform.include?('mdn') @logger.warn('mdn run') @monitor = MdnMonitor.new(@test_case, result_hash) elsif platform.include?('dta') @logger.warn('Dta run') @monitor = DtaMonitor.new(@test_case, result_hash) else @logger.warn('Base run') @monitor = BaseMonitor.new(@test_case, result_hash) end end |
#mac_audit ⇒ Object
Public: The script to run the mac_audit against STB’s
Returns nothing
65 66 67 68 |
# File 'lib/test_case/monitoring/monitoring_test.rb', line 65 def mac_audit ## get mac info @monitor.find_mac end |
#menu ⇒ Object
56 57 58 59 60 |
# File 'lib/test_case/monitoring/monitoring_test.rb', line 56 def platform = @dut.platform.downcase @logger.warn("#{platform.capitalize} menu check") @monitor. end |
#platform ⇒ Object
70 71 72 73 |
# File 'lib/test_case/monitoring/monitoring_test.rb', line 70 def platform ## check platform @monitor.check_platform end |
#power ⇒ Object
make sure the device can power on successfully.
37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/test_case/monitoring/monitoring_test.rb', line 37 def power @logger.warn('Reset Video') @dut.reset_video # in case resolution was changed but not reset @dut.resolution(update: true) sleep 2 # Start powercheck @logger.warn('Start Powercheck') @monitor.check_power @logger.warn('after powercheck') end |
#result_hash ⇒ Object
32 33 34 |
# File 'lib/test_case/monitoring/monitoring_test.rb', line 32 def result_hash @monitor.health_hash end |