How many test cases are needed for 100% decision coverage with a gender printing program?

Master the ISTQB Foundation Level exam with our comprehensive CTFL PRO tests. Dive into detailed multiple choice questions, complete with explanations and hints to maximize your understanding. Get exam-ready today!

To achieve 100% decision coverage, it is essential to ensure that every possible outcome of a decision point in the program is tested. In the context of a gender printing program, we can assume there are two primary decision points: determining if the input corresponds to "male" or "female".

To achieve complete decision coverage, at least one test case must be executed for each potential decision outcome. Consequently, one test case would be required for the scenario when the input matches "male" and another test case for when it matches "female". This means that at least two test cases are necessary to cover all possible decisions made by the program.

The first case would validate the program's response when the gender is male, and the second case would validate it when the gender is female. Any additional scenarios, such as an unspecified gender or incorrect input, would not impact the 100% decision coverage of the primary decision points, which focus specifically on the gender determination logic. Thus, to ensure complete coverage of all decision outcomes in this specific program, two test cases are required.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy