Writing high-quality test cases is the bedrock of software quality engineering. A well-written test case is unambiguous, easily reproducible, and executable by any engineer on the team.
Key Components of an Enterprise Test Case
- Test ID: Unique identifier (e.g.,
TC_AUTH_001). - Test Objective: Clear description of what is being validated.
- Pre-conditions: Prerequisites required before test execution (e.g., user is logged out, database seeded).
- Test Steps: Numbered sequential steps with exact button names and input fields.
- Expected Result: The exact outcome expected according to PRD/BRD.
Example Test Case Table
| Field | Value |
|-------|-------|
| ID | TC_CART_014 |
| Title | Verify Promo Code Discount Calculation on Checkout |
| Precondition | Cart has items total โน5,000; Promo "SAVE20" is active |
| Steps | 1. Navigate to /checkout. 2. Enter code "SAVE20". 3. Click Apply. |
| Expected | Total displays โน4,000 (-โน1,000 discount); success badge shows |