shape
shape

ISTQB-Foundation -chapter4-question7

  • Home
  • ISTQB-Foundation -chapter4-question7

Chapter 4

4.2 Black-box Test Techniques

FL-4.2.1 (K3) Use equivalence partitioning to derive test cases

        4. The system for selling cinema tickets calculates the discount type based on the client’s birth year (BY) and on th current year (CY) as follows:

Let D be the difference between CY and BY, that is, D = CY – BY

  • If D < 0 then print the error message “birth year cannot be greater than current year”
  • If 0 ≤ D < 18 then apply the student discount
  • If 18 ≤ D < 65      then apply no discount
  • If D ≥ 65               then apply the pensioner discount

Your test suite already contains two test cases:

  • BY = 1990, CY = 2020,           expected result: no discount
  • BY = 2030,           CY = 2029,           expected result: print the error message

Which of the following test data sets should be added to achieve full valid equivalence partitioning coverage for the discount type?

 

a) BY = 2001,                           CY = 2065  

b) BY = 1900,                           CY = 1965  

c)  BY = 1965,                           CY = 1900       

d) BY = 2011,                           CY = 2029

e) BY = 2000,                           CY = 2000 

Answer Explanation