Test case template

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

Phong Do Phong Do · 04/09/2025 · 4 phút đọc

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

5. Pre-conditions

  1. [Điều kiện tiên quyết 1]
  2. [Điều kiện tiên quyết 2]
  3. Database đã có dữ liệu test
  4. Test user account đã được tạo
  5. 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

StepActionTest DataExpected ResultVerification PointScreenshot
1Navigate to applicationURL: https://qa.example.comHomepage loads successfully– Page title correct
– Logo visible
– Menu items displayed
Yes
2Click on Login buttonN/ALogin modal appears– Modal overlay visible
– Email field focused
– Password field visible
Yes
3Enter credentialsEmail: testuser@example.com
Password: Test@2024!
Credentials accepted– No validation errors
– Password masked
No
4Click SubmitN/ALogin successful– Redirected to dashboard
– Welcome message displayed
– User menu visible
Yes
5Verify user profileN/AProfile information correct– Name matches
– Email matches
– Avatar displayed
Yes

8. Alternative Flows

Alternative Flow 1: Login with Remember Me

  1. Follow steps 1-3 from main flow
  2. Check “Remember Me” checkbox
  3. Continue with step 4
  4. Verify cookie is set for 30 days

Alternative Flow 2: Login with Social Account

  1. Click “Login with Google”
  2. Complete Google authentication
  3. Verify automatic account creation

9. Negative Test Scenarios

ScenarioInputExpected Behavior
Invalid email formattest@invalidError: “Please enter valid email”
Wrong passwordWrong@123Error: “Invalid credentials”
SQL injectionadmin’ OR ‘1’=’1Input sanitized, login fails
XSS attemptInput 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

DateTesterEnvironmentResultBuild #Notes
[Date][Name]QAPass/Failv1.2.3[Notes]

Defects Found

Defect IDSummarySeverityStatus
BUG-001[Summary]MajorOpen

13. Cleanup Steps

  1. Logout from application
  2. Clear browser cache and cookies
  3. Delete test data from database
  4. 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

RiskImpactProbabilityMitigation
Test data corruptionHighLowRegular backup
Environment downtimeHighMediumMultiple environments
Network issuesMediumMediumRetry 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

Phong Do
Tác giả
Phong Do