How many test cases are needed for 100% decision coverage in a given pseudo code?

Prepare for the ISTQB Certified Tester Foundation Level Exam. Use flashcards and multiple choice questions with hints and explanations to ensure success. Get ready for your certification!

To achieve 100% decision coverage in testing, it is essential to ensure that every decision point in the code is evaluated for both true and false outcomes. This means that for each condition within control statements (like if statements or loops), test cases must be designed to cover all possible paths that the program can take based on these conditions.

In given pseudo code, if there are multiple decision points, each must be addressed by your test cases. If there are two decision points that can provide various outcomes, a minimum of four distinct combinations of test cases would typically be required to ensure that:

  1. Every decision results in true at least once.

  2. Every decision results in false at least once.

Thus, the need for multiple cases arises, especially when there are nested or sequenced decisions that lead to different code paths. The correct answer signifies that a sufficient number of tests must be executed to cover every decision in the pseudo code, resulting in total paths covered being maximized and ensuring thorough verification of the logic.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy