# Test Cases: Rectangle comparison Program

Assignment 4: Test Cases: Rectangle comparison Program

CIS 525 – Software testing and Quality Assurance

Requirement for Area of Rectangle: –

Hand solving problem.

• User input length of rectangle 1.
• User input Width of rectangle 1.
• User input length of rectangle 2.
• User input Width of rectangle 2.
• Calculating area1 length and width of rectangle 1.
• Calculating area2 length and width of rectangle 2.
• Software verifies area 1 is greater than area 2.
• Software verifies area 2 is greater than area 1.
• Software verifies area 1=area 2.
• Software display rectangle 1 larger than rectangle 2.
• Software display rectangle 2 larger than rectangle 1.
• Software display rectangle 1 = rectangle 2.

Python Unit Testing program: –

 Test case Rect1L1 Rect 1W1 Rect 2L2 Rect 2W2 A1>A2 A1 A1=A2 Output/result invalid 1 10 4 5 2 Yes no no no 2 5 2 15 20 No yes no No 3 5 4 2 10 No no yes No 4 8 2 4 2 Yes no no no
 Test case Rect1L1 Rect 1W1 Rect 2L2 Rect 2W2 A1>A2 A1 A1=A2 Output/result invalid 5 -2 4 8 4 no no no Yes 6 5 4 6 -1 no no no yes
 Test case Rect1L1 Rect 1W1 Rect 2L2 Rect 2W2 A1>A2 A1 A1=A2 Output/result invalid 7 A 4 8 4 no no no Yes 8 5 4 \$ -1 no no no yes