QuestionQ157

Chapter 4: Test Analysis and Design

A requirement states that when the total amount of sales (TAS) made during the year by a corporate seller is 300,000€ or greater, the bonus payable to that seller must be 100% of a certain amount agreed at the start of the year. The software has a defect because it implements this rule using IF (TAS = 300,000) rather than IF (TAS >= 300,000). Applying 3-value boundary value analysis to this problem gives the following three test cases (TAS is an integer variable):

  • TC1 = 299,999 -
  • TC2=300,000 -
  • TC=300,001 -

Which of the following statements is TRUE?

  • A TC1 would highlight the fault.
  • B TC2 would highlight the fault.
  • C TC3 would highlight the fault.
  • D None of the three test cases would highlight the fault.
Explanation

A TAS value of 300,001 satisfies the required condition TAS >= 300,000, so the seller should receive the 100% bonus. The faulty equality check accepts only exactly 300,000 and therefore fails to award the required bonus at 300,001.

Community Discussion

No comments yet. Be the first to start the discussion!