Class: Bucky::Core::TestCore::TestManager

Inherits:
Object
  • Object
show all
Includes:
ParallelHelper
Defined in:
lib/bucky/core/test_core/test_manager.rb

Instance Method Summary collapse

Constructor Details

#initialize(test_cond) ⇒ TestManager

Keep test conditions and round number



56
57
58
59
60
61
62
# File 'lib/bucky/core/test_core/test_manager.rb', line 56

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])
end

Instance Method Details

#rerunObject

Rerun by job id



69
70
71
72
73
74
75
76
# File 'lib/bucky/core/test_core/test_manager.rb', line 69

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

#runObject



64
65
66
# File 'lib/bucky/core/test_core/test_manager.rb', line 64

def run
  execute_test
end