Test case template
[Manual testing] Template test case 02: style chi tiết

1. Test Case Overview
Basic Information
- Test Case ID: TC_[Module][Feature][Number]
- Test Case Title: [Mô tả ngắn gọn test case]
- Test Suite: [Tên test suite]
- Module: [Module được test]
- Sub-module: [Sub-module nếu có]
- Feature: [Tính năng cụ thể]
- Test Category: Smoke / Sanity / Regression / Integration / E2E
Classification
- Priority: P0 (Critical) / P1 (High) / P2 (Medium) / P3 (Low)
- Severity: Blocker / Critical / Major / Minor / Trivial
- Test Type: Positive / Negative / Boundary / Edge Case
- Execution Type: Manual / Automated / Semi-automated
- Environment: Dev / QA / Staging / Production
Metadata
- Author: [Tên người tạo]
- Reviewer: [Tên người review]
- Created Date: [DD/MM/YYYY]
- Last Modified: [DD/MM/YYYY]
- Version: [1.0]
2. Test Objective
[Mô tả chi tiết mục đích của test case này, tại sao cần test và expected outcome]
3. Requirements Mapping
- Requirement ID: REQ_XXX
- User Story: US_XXX
- Acceptance Criteria: AC_XXX
- Business Rule: BR_XXX
4. Test Environment Setup
Browser Requirements
- Chrome (version >= 100)
- Firefox (version >= 98)
- Safari (version >= 15)
- Edge (version >= 100)
System Requirements
- OS: Windows 10+ / macOS 12+ / Ubuntu 20.04+
- RAM: Minimum 4GB
- Screen Resolution: 1920×1080 recommended
- Network: Stable internet connection
Test URLs
- Dev: https://dev.example.com
- QA: https://qa.example.com
- Staging: https://staging.example.com
5. Pre-conditions
- [Điều kiện tiên quyết 1]
- [Điều kiện tiên quyết 2]
- Database đã có dữ liệu test
- Test user account đã được tạo
- Browser cache và cookies đã được clear
6. Test Data Requirements
Input Data
Username: testuser@example.com
Password: Test@2024!
Phone: +84901234567
Address: 123 Test Street
Credit Card: 4111-1111-1111-1111
Database Setup
-- Sample data setup script
INSERT INTO users (email, name, role)
VALUES ('testuser@example.com', 'Test User', 'customer');
API Test Data
{
"userId": "12345",
"productId": "ABC123",
"quantity": 2,
"paymentMethod": "credit_card"
}
7. Detailed Test Steps
| Step | Action | Test Data | Expected Result | Verification Point | Screenshot |
|---|---|---|---|---|---|
| 1 | Navigate to application | URL: https://qa.example.com | Homepage loads successfully | – Page title correct – Logo visible – Menu items displayed | Yes |
| 2 | Click on Login button | N/A | Login modal appears | – Modal overlay visible – Email field focused – Password field visible | Yes |
| 3 | Enter credentials | Email: testuser@example.com Password: Test@2024! | Credentials accepted | – No validation errors – Password masked | No |
| 4 | Click Submit | N/A | Login successful | – Redirected to dashboard – Welcome message displayed – User menu visible | Yes |
| 5 | Verify user profile | N/A | Profile information correct | – Name matches – Email matches – Avatar displayed | Yes |
8. Alternative Flows
Alternative Flow 1: Login with Remember Me
- Follow steps 1-3 from main flow
- Check “Remember Me” checkbox
- Continue with step 4
- Verify cookie is set for 30 days
Alternative Flow 2: Login with Social Account
- Click “Login with Google”
- Complete Google authentication
- Verify automatic account creation
9. Negative Test Scenarios
| Scenario | Input | Expected Behavior |
|---|---|---|
| Invalid email format | test@invalid | Error: “Please enter valid email” |
| Wrong password | Wrong@123 | Error: “Invalid credentials” |
| SQL injection | admin’ OR ‘1’=’1 | Input sanitized, login fails |
| XSS attempt | Input escaped, no script execution |
10. Expected Results
Functional Validation
- User successfully authenticated
- Session created with correct permissions
- User data loaded correctly
- Navigation to dashboard successful
UI/UX Validation
- All UI elements rendered correctly
- Responsive design works on different screen sizes
- Loading indicators shown during processing
- Success messages displayed appropriately
Performance Criteria
- Page load time < 3 seconds
- Login process < 2 seconds
- No memory leaks detected
- CPU usage < 30%
11. Post-conditions
- User session active
- Login history recorded in database
- Audit log entry created
- Session timeout set to 30 minutes
- Test data can be cleaned up
12. Test Execution Results
Execution History
| Date | Tester | Environment | Result | Build # | Notes |
|---|---|---|---|---|---|
| [Date] | [Name] | QA | Pass/Fail | v1.2.3 | [Notes] |
Defects Found
| Defect ID | Summary | Severity | Status |
|---|---|---|---|
| BUG-001 | [Summary] | Major | Open |
13. Cleanup Steps
- Logout from application
- Clear browser cache and cookies
- Delete test data from database
- Reset test environment if needed
14. Dependencies
- Authentication service must be running
- Database connection available
- Email service configured
- Payment gateway sandbox active
15. Risks and Mitigation
| Risk | Impact | Probability | Mitigation |
|---|---|---|---|
| Test data corruption | High | Low | Regular backup |
| Environment downtime | High | Medium | Multiple environments |
| Network issues | Medium | Medium | Retry mechanism |
16. Attachments
- [ ] Test data file
- [ ] Screenshots
- [ ] Video recording
- [ ] Log files
- [ ] Performance reports
17. Sign-off
- Test Case Reviewed By: [Name] – [Date]
- Test Case Approved By: [Name] – [Date]
- Test Execution Sign-off: [Name] – [Date]
18. Notes and Comments
[Additional notes, observations, or recommendations for improvement]
Template excel: Link
