Question: Equivalence Partitioning A software program is used by a store to compute the discount it offers on the amount of purchases made by an individual:

Equivalence Partitioning

  1. A software program is used by a store to compute the discount it offers on the amount of purchases made by an individual: The purchase price input is an integer.

A purchase amount is in the range of 1 up to 50 there is no discount,

A purchase amount over 50 and up to 200 has a 5% discount, A purchase amount of 201 and up to 500 has a 10% discount, A purchase amount of 501 and above has a 15% discount

Additionally, if the customer is a member of the loyalty club they get an added discount of 20% on purchases of value 201 and greater.

If the value entered for the purchase is accidentally entered as a negative number the discount value returned is -1%.

The program input consists of 2 parameters: int purchases and boolean isMember. The program output is the int discount value as a percentage. Any invalid input returns a value of -1%.

Considering the Black-Box Software testing methods of Equivalence Partitions for this program fill in table with the input and output partitions. Then write out suitable tests ensuring to outline the partitions covered with each set of test data and highlight the error cases with an asterisk. [20 marks]

Test Cases

Input Partitions

Range

Parameter purchases

EP1

EP2

EP3

EP4

Parameter isMember

EP5

EP6

Output Partitions

Parameter discount

EP7

EP8

EP9

EP10

EP11

EP12

*EP13

Error Case

-1

Test Data

Test No.

Test Cases Covered

Inputs

Expected Outputs

Purchases

isMember

discount

1

2

3

4

5

6

7*

EP13

0

False

-1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!