How many test cases are necessary in order to achieve 100% branch coverage of the process flow?
The following part of a business process flow is specified; REPEAT (book a bill) UNTIL (User presses Cancel).
How many test cases are necessary in order to achieve 100% branch coverage of the process flow?
A . 4
B . 1
C . 2
D . Infinite
Answer: C
Explanation:
To achieve 100% branch coverage of the process flow, we need to test both the true and false outcomes of the condition (User presses Cancel). Branch coverage is a type of structural testing that measures how many decision outcomes in a program have been executed by a test suite. Branch coverage can be used to assess the adequacy or completeness of a test suite.
To test the true outcome of the condition, we need a test case that simulates the user pressing Cancel after booking a bill. This test case will exit the loop and end the process flow.
To test the false outcome of the condition, we need a test case that simulates the user not pressing Cancel after booking a bill. This test case will repeat the loop and book another bill.
Therefore, we need at least two test cases to achieve 100% branch coverage of the process flow. One test case for each possible outcome of the condition.
Verified
Reference: [A Study Guide to the ISTQB® Foundation Level 2018 Syllabus – Springer], Chapter 4, page 40-41.
Latest ISTQB-CTFL Dumps Valid Version with 76 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund