Nothing Special   »   [go: up one dir, main page]

Lab Assignment 2: There Are Total 5 Test Cases in Weak Normal Equivalence Class Testing

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Lab Assignment 2

Q1. A function named compute-electricity-bill was written to compute the electricity bill by
an electricity distribution company. This function takes two parameters, the number of units
consumed by a customer and the corresponding customer type. The customer type is an
integer value in the range 1 to 5 indicating whether the customer is domestic, industrial,
commercial establishment, etc. The tariff depends not only the customer type, but also on the
number of units consumed. The slabs for different charges based on the units consumed are 0
to 100 units, 100 to 200 units, 200 to 500 units, and 500 units and above. How many test
cases are required?
For performing
1) Weak Normal Equivalence Class Testing
2) Strong Normal Equivalence Class Testing
3) Weak Robust Equivalence Class Testing
4) Strong Robust Equivalence Class Testing

Input Variables / Valid Classes

U1: {Units: 0 <= units <=100}


U2: {Units: 100 < units <=200}
U3: {Units: 200 < units <=500}
U4: {Units: 500 < units <= above}
C1: {Customer Type: 1-5}

Input Variables / Invalid Classes

U5: {Units: Units > Less than 0}


C2: {Customer Type: Customer Type = 6}

Weak Normal Equivalence Class Testing

1 2 3 4 5
0-100 *
100-200 * *
200-500 *
500 & above *

There are total 5 test cases in weak normal equivalence class testing.
Strong Normal Equivalence Class Testing

1 2 3 4 5
0-100 * * * * *
100-200 * * * * *
200-500 * * * * *
500 & above * * * * *

There are total 20 test cases in strong normal equivalence class testing.

Weak Robust Equivalence Class Testing

1 2 3 4 5 6
Less than 0 *
0-100 * Invalid
100-200 * * Cases
200-500 *
500 & above * *

There are total 7 test cases in Weak Robust Equivalence Class Testing

Strong Robust Equivalence Class Testing


Invalid
Cases
1 2 3 4 5 6
Less than 0 * * * * * *
0-100 * * * * * *
100-200 * * * * * *
200-500 * * * * * *
500 & above * * * * * *

There are total 30 test cases in Strong Robust Equivalence Class Testing

You might also like