Class: Bucky::TestEquipment::TestCase::AbstTestCase
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- Bucky::TestEquipment::TestCase::AbstTestCase
show all
- Defined in:
- lib/bucky/test_equipment/test_case/abst_test_case.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.shutdown ⇒ Object
19
20
21
|
# File 'lib/bucky/test_equipment/test_case/abst_test_case.rb', line 19
def shutdown
@@this_result.save(@@added_result_info) unless $debug
end
|
.startup ⇒ Object
12
13
14
15
16
17
|
# File 'lib/bucky/test_equipment/test_case/abst_test_case.rb', line 12
def startup
return if $debug
@@this_result = Bucky::Core::TestCore::TestResult.instance
@@added_result_info = {}
end
|
Instance Method Details
#cleanup ⇒ Object
52
|
# File 'lib/bucky/test_equipment/test_case/abst_test_case.rb', line 52
def cleanup; end
|
#run(result) ⇒ Object
Override Test::Unit::TestCase#run Save test result to own test result object.
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/bucky/test_equipment/test_case/abst_test_case.rb', line 26
def run(result)
super
@@this_result.result = result unless $debug
w_pipe.puts({
test_class_name: self.class.name,
cases_count: result.run_count,
success_count: result.pass_count,
failure_count: result.run_count - result.pass_count
}.to_json)
end
|
#setup ⇒ Object
37
38
39
40
|
# File 'lib/bucky/test_equipment/test_case/abst_test_case.rb', line 37
def setup
puts "\n"
end
|
#teardown ⇒ Object
42
43
44
45
46
47
48
49
50
|
# File 'lib/bucky/test_equipment/test_case/abst_test_case.rb', line 42
def teardown
return if $debug
@@added_result_info[method_name.to_sym] = {
test_suite_id: suite_id,
elapsed_time: Time.now - start_time,
case_name: description
}
end
|