A retail shop has provided a discount sale on their products. A module for calculating discount for the total amount of purchase is decided by the following factors
a) below 5000 then no discount
b) 5000 to 20000 then 5% discount
c) 20001 to 50000 then 10 % discount
d) above 50000 then 15% discount
Choose from the below appropriate test cases using boundary value analysis for the above scenario
Select one:
a.
Input Expected Output
4999 No Discount
5000 5%
15000 5%
20000 5%
20001 10%
30000 10%
50000 10%
50001 15%
b.
Input Expected Output
4999 No Discount
5000 5%
15000 5%
20001 10%
30000 10%
50000 10%
50001 15%
c.
Input Expected Output
4999 No Discount
5000 10%
15000 10%
20000 5%
20001 5%
30000 5%
50000 10%
50001 15%
d.
Input Expected Output
4999 No Discount
5000 5%
15000 5%
20000 5%
20003 10%
30000 10%
50000 10%
50001 15%
Answers & Comments
Answer:
Explanation:
The appropriate test cases for the given scenario using boundary value analysis would be:
Input Expected Output
4999 No Discount
5000 5%
15000 5%
20000 5%
20001 10%
30000 10%
50000 10%
50001 15%
This test case set covers the full range of input values and includes test cases at the boundaries between the different discount ranges, as well as test cases within each range. It helps to ensure that the discount calculation module is functioning correctly and consistently across all input values.
Answer:
The correct answer is Option (a).
Explanation:
Option (a) is an appropriate set of test cases for the given scenario using boundary value analysis. It includes test cases at the lower and upper boundaries of each discount range, as well as test cases within the ranges, which helps ensure that the module is correctly applying the discounts as intended.
Option (b) is not an appropriate set of test cases because it does not include a test case at the upper boundary of the 5% discount range.
Option (c) is not an appropriate set of test cases because it includes incorrect expected output for some of the test cases. For example, the input of 5000 should have an expected output of 5%, not 10%.
Option (d) is not an appropriate set of test cases because it includes an invalid input of 20003, which is outside the range of valid inputs (below 5000 or above 50000).