Class: DecisionAgent::Testing::CoverageReport
- Inherits:
-
Object
- Object
- DecisionAgent::Testing::CoverageReport
- Defined in:
- lib/decision_agent/testing/test_coverage_analyzer.rb
Overview
Coverage report for test scenarios
Instance Attribute Summary collapse
-
#condition_coverage ⇒ Object
readonly
Returns the value of attribute condition_coverage.
-
#coverage_percentage ⇒ Object
readonly
Returns the value of attribute coverage_percentage.
-
#covered_rules ⇒ Object
readonly
Returns the value of attribute covered_rules.
-
#rule_coverage ⇒ Object
readonly
Returns the value of attribute rule_coverage.
-
#total_rules ⇒ Object
readonly
Returns the value of attribute total_rules.
-
#untested_rules ⇒ Object
readonly
Returns the value of attribute untested_rules.
Instance Method Summary collapse
-
#initialize(total_rules:, covered_rules:, untested_rules:, coverage_percentage:, rule_coverage:, condition_coverage:) ⇒ CoverageReport
constructor
A new instance of CoverageReport.
- #to_h ⇒ Object
Constructor Details
#initialize(total_rules:, covered_rules:, untested_rules:, coverage_percentage:, rule_coverage:, condition_coverage:) ⇒ CoverageReport
Returns a new instance of CoverageReport.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/decision_agent/testing/test_coverage_analyzer.rb', line 11 def initialize(total_rules:, covered_rules:, untested_rules:, coverage_percentage:, rule_coverage:, condition_coverage:) @total_rules = total_rules @covered_rules = covered_rules @untested_rules = untested_rules.freeze @coverage_percentage = coverage_percentage @rule_coverage = rule_coverage.freeze @condition_coverage = condition_coverage.freeze freeze end |
Instance Attribute Details
#condition_coverage ⇒ Object (readonly)
Returns the value of attribute condition_coverage.
9 10 11 |
# File 'lib/decision_agent/testing/test_coverage_analyzer.rb', line 9 def condition_coverage @condition_coverage end |
#coverage_percentage ⇒ Object (readonly)
Returns the value of attribute coverage_percentage.
9 10 11 |
# File 'lib/decision_agent/testing/test_coverage_analyzer.rb', line 9 def coverage_percentage @coverage_percentage end |
#covered_rules ⇒ Object (readonly)
Returns the value of attribute covered_rules.
9 10 11 |
# File 'lib/decision_agent/testing/test_coverage_analyzer.rb', line 9 def covered_rules @covered_rules end |
#rule_coverage ⇒ Object (readonly)
Returns the value of attribute rule_coverage.
9 10 11 |
# File 'lib/decision_agent/testing/test_coverage_analyzer.rb', line 9 def rule_coverage @rule_coverage end |
#total_rules ⇒ Object (readonly)
Returns the value of attribute total_rules.
9 10 11 |
# File 'lib/decision_agent/testing/test_coverage_analyzer.rb', line 9 def total_rules @total_rules end |
#untested_rules ⇒ Object (readonly)
Returns the value of attribute untested_rules.
9 10 11 |
# File 'lib/decision_agent/testing/test_coverage_analyzer.rb', line 9 def untested_rules @untested_rules end |
Instance Method Details
#to_h ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/decision_agent/testing/test_coverage_analyzer.rb', line 22 def to_h { total_rules: @total_rules, covered_rules: @covered_rules, untested_rules: @untested_rules, coverage_percentage: @coverage_percentage, rule_coverage: @rule_coverage, condition_coverage: @condition_coverage } end |