How to Write Effective Test Cases & Defect Reports with Examples
Well-crafted test cases and bug reports are the core deliverable of any Software QA team. They serve as clear documentation for developer bug fixes, regression verification, and release quality readiness.
1. Key Components of a Standard Test Case
A professional test case should be unambiguous, executable by any tester, and contain:
- Test Case ID: Unique identifier (e.g.,
TC_AUTH_001). - Title / Summary: Clear, action-oriented statement of what is tested.
- Preconditions: System prerequisites prior to test execution.
- Test Steps: Numbered, explicit actions to perform.
- Test Data: Input parameters, user credentials, or file payloads used.
- Expected Result: Precise, measurable behavior expected from the application.
- Postconditions: System state following test completion.
2. Practical Test Case Example
ID: TC_CHECKOUT_004
Title: Verify checkout with valid promo code discount calculation
Preconditions: User is logged in; cart contains 1 item ($100.00)
Test Steps:
- Navigate to Shopping Cart page (/cart)
- Enter promo code "SUMMER20" into Promo Code field
- Click "Apply Discount" button
Expected Result: Success message "Promo applied (20% off)" displays; Cart subtotal updates from $100.00 to $80.00; Total displays $80.00.
3. Severity vs Priority in Defect Management
Understanding the distinction between Severity and Priority is critical for triage:
Defect Severity
Measures the technical impact of a bug on system stability.
Levels: Critical (Crash), Major, Minor, Low.
Defect Priority
Measures the business urgency of fixing the bug.
Levels: P1 (Immediate), P2 (High), P3 (Medium), P4 (Low).
4. Professional Defect Report Structure
When logging bugs in JIRA, always include step-by-step reproduction steps, actual vs expected results, environment details (OS, Browser, App Build), server logs, console trace, and screenshots/screen recordings.