ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 45 - CTFL4 discussion

Report
Export

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
Answers
A.
4
B.
1
Answers
B.
1
C.
2
Answers
C.
2
D.
Infinite
Answers
D.
Infinite
Suggested 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.

asked 18/09/2024
Mikolaj Roeper
36 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first