To determine the percentage of decision testing coverage achieved by the given suite of test cases,
we need to analyze the decisions and outcomes in the provided logic.
Detailed Analysis
Identify all decisions in the logic:
IF account number is valid
IF customer account is active
IF oldBalance < zero
IF balance now >= zero
IF account holder is VIP customer
Calculate the number of unique decisions:
There are 5 unique decision points in the logic.
Determine the possible outcomes for each decision:
IF account number is valid → 2 outcomes (True, False)
IF customer account is active → 2 outcomes (True, False)
IF oldBalance < zero → 2 outcomes (True, False)
IF balance now >= zero → 2 outcomes (True, False)
IF account holder is VIP customer → 2 outcomes (True, False)
Test Cases Analysis
Test Case A
Account number valid → True
Account is active → True
OldBalance = -100 → True (less than zero)
Balance now = +200 → True (greater than zero)
Not a VIP customer → False
Test Case B
Account number valid → True
Account is active → True
OldBalance = -100 → True (less than zero)
Balance now = -50 → False (less than zero)
Is a VIP customer → True
Coverage Calculation
To calculate the decision coverage, we need to see how many of the possible outcomes are covered
by the test cases:
IF account number is valid (True in both A and B, False not tested)
IF customer account is active (True in both A and B, False not tested)
IF oldBalance < zero (True in both A and B, False not tested)
IF balance now >= zero (True in A, False in B, both outcomes tested)
IF account holder is VIP customer (False in A, True in B, both outcomes tested)
Out of the 10 possible outcomes (2 for each decision), the given test cases cover 6 outcomes:
Account number valid → True
Account number valid → False (not covered)
Customer account active → True
Customer account active → False (not covered)
OldBalance < zero → True
OldBalance < zero → False (not covered)
Balance now >= zero → True
Balance now >= zero → False
Account holder is VIP → True
Account holder is VIP → False
Thus, 6 out of the 10 outcomes are covered by the test cases, giving us a decision coverage
percentage of:
DecisionCoverage=(610)×100%=60%\text{Decision Coverage} = \left(\frac{6}{10}\right) \times
100\% = 60\%DecisionCoverage=(106)×100%=60%
Reference:
The sample questions and answers provided in the ISTQB CTAL-TTA documentation confirm this
calculation method and the expected coverage percentage for similar logical scenarios.