Class BddCoverageChecker
java.lang.Object
software.amazon.smithy.rulesengine.analysis.BddCoverageChecker
Analyzes test coverage for BDD-based endpoint rules.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
evaluateInput
(Map<Identifier, Value> input) Evaluates with the given inputs and updates coverage.void
evaluateTestCase
(EndpointTestCase testCase) Evaluates a test case and updates coverage information.double
Returns the percentage of conditions that were evaluated at least once.double
Returns the percentage of results that were reached at least once.Returns conditions that were never evaluated during testing.Returns results that were never reached during testing.
-
Constructor Details
-
BddCoverageChecker
-
-
Method Details
-
evaluateTestCase
Evaluates a test case and updates coverage information.- Parameters:
testCase
- the test case to evaluate
-
evaluateInput
Evaluates with the given inputs and updates coverage.- Parameters:
input
- the input parameters to evaluate
-
getUnevaluatedConditions
Returns conditions that were never evaluated during testing.- Returns:
- set of unevaluated conditions
-
getUnevaluatedResults
Returns results that were never reached during testing.- Returns:
- set of unreached results
-
getConditionCoverage
public double getConditionCoverage()Returns the percentage of conditions that were evaluated at least once.- Returns:
- condition coverage percentage (0-100)
-
getResultCoverage
public double getResultCoverage()Returns the percentage of results that were reached at least once.- Returns:
- result coverage percentage (0-100)
-