Software Quality Assurance & Testing Lab
(SE313) 40-G1 Lab Evaluation 1 Summer 2025
Solution
Task 1: Identify Equivalence Classes
For Customer Age (integer from 0 to 120):
• Valid Classes:
• EC1: Age < 16 (0 ≤ Age < 16) – Eligible for 40% discount.
• EC2: Age ≥ 16 and < 65 (16 ≤ Age < 65) – No discount.
• EC3: Age ≥ 65 (65 ≤ Age ≤ 120) – Eligible for 25% discount.
• Invalid Classes:
• EC4: Age < 0 – Invalid input (below range).
• EC5: Age > 120 – Invalid input (above range).
• Boundary Conditions: Ages 0, 16, 65, and 120 are boundaries for valid classes, while -1 and 121 are
boundaries for invalid classes.
For Ticket Type (string, either "Regular" or "Premium"):
• Valid Classes:
• EC6: Ticket Type = "Regular" – Base price $50.
• EC7: Ticket Type = "Premium" – Base price $80.
• Invalid Classes:
• EC8: Ticket Type ≠ "Regular" or "Premium" (e.g., empty string, "VIP", etc.) – Invalid input.
Task 2: Strong Robust Equivalence Class Test Cases
Strong Robust Equivalence Class Testing includes all valid and invalid equivalence classes, testing both
valid and invalid inputs for each variable, including boundary values. The expected price is calculated as
follows:
• Regular: Base price = $50; Age < 16: $50 × 0.6 = $30; Age ≥ 65: $50 × 0.75 = $37.5.
• Premium: Base price = $80; Age < 16: $80 × 0.6 = $48; Age ≥ 65: $80 × 0.75 = $60.
• Status is "Confirmed" for valid inputs (EC1–EC3 and EC6–EC7) and "Rejected" for invalid inputs
(EC4, EC5, EC8).
Below is the test case table covering all equivalence classes and boundaries:
Page | 1
Strong Robust Equivalence Class Test Cases
Test Case ID Customer Age Ticket Type Expected Price Expected Status Validity
TC1 10 Regular $30.0 Confirmed Valid
TC2 16 Regular $50.0 Confirmed Valid
TC3 65 Regular $37.5 Confirmed Valid
TC4 10 Premium $48.0 Confirmed Valid
TC5 16 Premium $80.0 Confirmed Valid
TC6 65 Premium $60.0 Confirmed Valid
TC7 -1 Regular N/A Rejected Invalid
TC8 121 Regular N/A Rejected Invalid
TC9 10 VIP N/A Rejected Invalid
TC10 -1 Premium N/A Rejected Invalid
TC11 121 Premium N/A Rejected Invalid
TC12 16 VIP N/A Rejected Invalid
TC13 65 VIP N/A Rejected Invalid
TC14 -1 VIP N/A Rejected Invalid
TC15 121 VIP N/A Rejected Invalid
TC16 0 Regular $30.0 Confirmed Valid
TC17 120 Premium $60.0 Confirmed Valid
Analysis
The test cases cover all equivalence classes (EC1–EC8) for Customer Age and Ticket Type, including valid
(TC1–TC6, TC16–TC17) and invalid (TC7–TC15) inputs. Boundary values (0, 16, 65, 120, -1, 121) are
tested to ensure proper handling of edge cases. The Strong Robust approach ensures comprehensive testing
by combining valid and invalid classes for both inputs, verifying price calculations and status outputs.
Page | 2