Class: Bucky::Core::TestCore::TestManager
- Inherits:
-
Object
- Object
- Bucky::Core::TestCore::TestManager
- Includes:
- ParallelHelper
- Defined in:
- lib/bucky/core/test_core/test_manager.rb
Instance Method Summary collapse
-
#initialize(test_cond) ⇒ TestManager
constructor
Keep test conditions and round number.
-
#rerun ⇒ Object
Rerun by job id.
- #run ⇒ Object
Constructor Details
#initialize(test_cond) ⇒ TestManager
Keep test conditions and round number
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/bucky/core/test_core/test_manager.rb', line 91 def initialize(test_cond) @test_cond = test_cond @re_test_count = @test_cond[:re_test_count] @tdo = Bucky::Core::Database::TestDataOperator.new @start_time = Time.now $job_id = @tdo.save_job_record_and_get_job_id(@start_time, @test_cond[:command_and_option], @test_cond[:base_fqdn]) @json_report = { summary: { cases_count: 0, success_count: 0, failure_count: 0, job_id: $job_id, test_category: test_cond[:test_category], device: test_cond[:device], labels: test_cond[:label], exclude_labels: test_cond[:xlabel], rerun_job_id: test_cond[:job], round_count: 0 } } end |
Instance Method Details
#rerun ⇒ Object
Rerun by job id
118 119 120 121 122 123 124 125 |
# File 'lib/bucky/core/test_core/test_manager.rb', line 118 def rerun rerun_job_id = @test_cond[:job] $round = @tdo.get_last_round_from_job_id(rerun_job_id) @test_cond[:re_test_cond] = @tdo.get_ng_test_cases_at_last_execution( is_error: 1, job_id: rerun_job_id, round: $round ) execute_test end |
#run ⇒ Object
113 114 115 |
# File 'lib/bucky/core/test_core/test_manager.rb', line 113 def run execute_test end |