White-box test techniques · Question 43 of 60

Code: "if member, then (if turnover > 1000, then discount 10% else discount 5%) else no discount". What is the minimum number of test cases for 100% branch coverage?

1 answer is correct. Hard Created with AI

Show answer

Answer

  • B 3

Explanation

There are three routes to the three outcomes: member with high turnover, member with low turnover and non-member. Each needs its own test.

Certifications & exams

Which exam comes next?

You can already practise for 51 exams, and 16 are up for a vote. See all certifications with their official information, cast your vote or suggest your exam.

See all certifications