Class: SixthSense::Model::CoverageMap
- Inherits:
-
Struct
- Object
- Struct
- SixthSense::Model::CoverageMap
- Defined in:
- lib/sixth_sense/model.rb
Instance Attribute Summary collapse
-
#per_test_branches ⇒ Object
Returns the value of attribute per_test_branches.
-
#per_test_lines ⇒ Object
Returns the value of attribute per_test_lines.
-
#total_branches ⇒ Object
Returns the value of attribute total_branches.
-
#total_lines ⇒ Object
Returns the value of attribute total_lines.
Instance Method Summary collapse
-
#branch_coverage_ratio ⇒ Object
Paper basis: Zhu/Hall/May 1997; this is the raw satisfied-branch requirement ratio preferred by adequacy/coverage.
-
#branch_requirements_for(test_case_id) ⇒ Object
Paper basis: Zhu/Hall/May 1997; branch requirements provide a stronger structural adequacy signal than line requirements when available.
-
#line_coverage_ratio ⇒ Object
Paper basis: Zhu/Hall/May 1997; this is the raw satisfied-line requirement ratio used by adequacy/coverage.
-
#line_requirements_for(test_case_id) ⇒ Object
Paper basis: Zhu/Hall/May 1997 (doi:10.1145/267580.267590) treats executed lines as coverage requirements for adequacy criteria.
Instance Attribute Details
#per_test_branches ⇒ Object
Returns the value of attribute per_test_branches
92 93 94 |
# File 'lib/sixth_sense/model.rb', line 92 def per_test_branches @per_test_branches end |
#per_test_lines ⇒ Object
Returns the value of attribute per_test_lines
92 93 94 |
# File 'lib/sixth_sense/model.rb', line 92 def per_test_lines @per_test_lines end |
#total_branches ⇒ Object
Returns the value of attribute total_branches
92 93 94 |
# File 'lib/sixth_sense/model.rb', line 92 def total_branches @total_branches end |
#total_lines ⇒ Object
Returns the value of attribute total_lines
92 93 94 |
# File 'lib/sixth_sense/model.rb', line 92 def total_lines @total_lines end |
Instance Method Details
#branch_coverage_ratio ⇒ Object
Paper basis: Zhu/Hall/May 1997; this is the raw satisfied-branch requirement ratio preferred by adequacy/coverage.
119 120 121 |
# File 'lib/sixth_sense/model.rb', line 119 def branch_coverage_ratio ratio_for(per_test_branches, total_branches) end |
#branch_requirements_for(test_case_id) ⇒ Object
Paper basis: Zhu/Hall/May 1997; branch requirements provide a stronger structural adequacy signal than line requirements when available.
107 108 109 |
# File 'lib/sixth_sense/model.rb', line 107 def branch_requirements_for(test_case_id) normalize_requirements(per_test_branches.fetch(test_case_id, {})) end |
#line_coverage_ratio ⇒ Object
Paper basis: Zhu/Hall/May 1997; this is the raw satisfied-line requirement ratio used by adequacy/coverage.
113 114 115 |
# File 'lib/sixth_sense/model.rb', line 113 def line_coverage_ratio ratio_for(per_test_lines, total_lines) end |
#line_requirements_for(test_case_id) ⇒ Object
Paper basis: Zhu/Hall/May 1997 (doi:10.1145/267580.267590) treats executed lines as coverage requirements for adequacy criteria.
101 102 103 |
# File 'lib/sixth_sense/model.rb', line 101 def line_requirements_for(test_case_id) normalize_requirements(per_test_lines.fetch(test_case_id, {})) end |