📱 Học IELTS miễn phí: App IELTS 6.0

Giới thiệu

Bug Report (báo cáo lỗi) là một trong những loại document mà developer và QA viết nhiều nhất mỗi ngày. Một bug report tốt giúp team tìm và fix bug nhanh hơn, trong khi bug report kém khiến developer phải hỏi lại liên tục, làm chậm cả sprint.

Bài viết này sẽ giúp bạn:

  • Viết bug report rõ ràng, đầy đủ bằng tiếng Anh
  • Nắm vững từ vựng severity/priority
  • Có sẵn template và mẫu câu dùng ngay trên Jira, GitHub Issues, Bugzilla
  • Tránh những lỗi phổ biến khi mô tả bug

1. Cấu trúc Bug Report chuẩn

Một bug report tốt cần có đủ các phần sau:

PhầnTiếng AnhMô tả
Tiêu đềTitle / SummaryMô tả ngắn gọn bug
Môi trườngEnvironmentOS, browser, version
Các bước tái hiệnSteps to ReproduceTừng bước cụ thể
Kết quả thực tếActual ResultChuyện gì xảy ra
Kết quả mong đợiExpected ResultLẽ ra phải như thế nào
Mức độSeverity / PriorityNghiêm trọng đến đâu
Bằng chứngAttachmentsScreenshot, video, log

Template mẫu

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
## Bug Report

**Title:** [Component] — Short description of the issue

**Environment:**
- OS: Windows 11 / macOS 14.2 / Ubuntu 22.04
- Browser: Chrome 122.0 / Firefox 123.0
- App Version: v2.3.1
- Device: Desktop / iPhone 15 / Samsung Galaxy S24

**Steps to Reproduce:**
1. Navigate to the login page
2. Enter valid email and password
3. Click the "Sign In" button
4. Observe the error

**Actual Result:**
The page shows a 500 Internal Server Error after clicking "Sign In".

**Expected Result:**
The user should be redirected to the dashboard after successful login.

**Severity:** Critical
**Priority:** P1 — High

**Attachments:**
- Screenshot: [error-screenshot.png]
- Console log: [console-output.txt]

**Additional Notes:**
This issue occurs only on Chrome. Firefox works as expected.

2. Cách viết Title hiệu quả

Title là thứ mọi người đọc đầu tiên. Hãy viết rõ ràng, cụ thể.

Công thức

[Component/Page]Whathappens+When/Where

Ví dụ tốt vs kém

❌ Title kém✅ Title tốt
Login doesn’t work[Login Page] — 500 error when signing in with valid credentials on Chrome
Bug in cart[Shopping Cart] — Item quantity resets to 1 after page refresh
Upload broken[File Upload] — PDF files over 10MB fail to upload with timeout error
API error[User API] — GET /users/profile returns 403 for authenticated users
Page crash[Dashboard] — App crashes when filtering by date range > 1 year

Quy tắc viết Title

  • Cụ thể — nói rõ chuyện gì xảy ra, ở đâu
  • Không dùng “doesn’t work” — quá mơ hồ
  • Bao gồm điều kiện — khi nào bug xảy ra
  • Dùng present tense — “returns 403” thay vì “returned 403”

3. Steps to Reproduce — Chi tiết là vàng

Đây là phần quan trọng nhất của bug report. Developer cần tái hiện được bug mới fix được.

Mẫu câu hay dùng

Tiếng AnhTiếng ViệtIPA
Navigate to [page]Truy cập trang [page]/ˈnæv.ɪ.ɡeɪt/
Click on the [button]Click vào nút [button]/klɪk/
Enter [value] in the [field]Nhập [value] vào ô [field]/ˈen.tər/
Select [option] from the dropdownChọn [option] từ dropdown/sɪˈlekt/
Scroll down to [section]Kéo xuống phần [section]/skroʊl/
Wait for [X] secondsĐợi [X] giây/weɪt/
Observe the [behavior]Quan sát [behavior]/əbˈzɜːrv/
Refresh the pageTải lại trang/rɪˈfreʃ/
Log in as [role]Đăng nhập với role [role]/lɒɡ ɪn/
Toggle [feature] on/offBật/tắt [feature]/ˈtɒɡ.əl/

Ví dụ thực tế

1
2
3
4
5
6
7
8
**Steps to Reproduce:**
1. Log in as admin (admin@test.com / test123)
2. Navigate to Settings > User Management
3. Click "Add New User"
4. Fill in all required fields (name, email, role)
5. Click "Save"
6. Observe: the form submits but no success message appears
7. Refresh the page — the new user is NOT in the list

Lưu ý quan trọng:

  • Đánh số từng bước
  • Mỗi bước là một hành động
  • Ghi rõ test data nếu cần (email, password)
  • Nói rõ bước nào bug xuất hiện

4. Severity vs Priority — Phân biệt rõ

Nhiều developer nhầm lẫn hai khái niệm này:

Severity (Mức nghiêm trọng)Priority (Độ ưu tiên)
Định nghĩaBug ảnh hưởng hệ thống đến mức nàoBug cần fix sớm đến mức nào
Ai quyết địnhQA / DeveloperProduct Owner / Manager
Dựa trênTác động kỹ thuậtTác động kinh doanh

Severity Levels

LevelTiếng AnhNghĩaVí dụ
S1Critical / BlockerHệ thống sập, không dùng đượcApp crash on launch, data loss
S2MajorTính năng chính không hoạt độngCannot checkout, payment fails
S3MinorTính năng phụ lỗi, có workaroundSort order wrong, filter not working
S4Trivial / CosmeticLỗi giao diện, typoMisaligned button, wrong color

Priority Levels

LevelTiếng AnhNghĩa
P1Urgent / CriticalFix ngay, block release
P2HighFix trong sprint này
P3MediumFix khi có thời gian
P4LowNice to have, backlog

Kết hợp Severity + Priority

Tình huốngSeverityPriority
App crash khi thanh toánCriticalP1
Logo sai trên trang admin (ít người dùng)TrivialP4
Typo trên landing page (nhiều khách thấy)TrivialP2
Tính năng export CSV lỗi (có thể export Excel thay)MajorP3

5. Bảng từ vựng Bug Report

Từ / Cụm từIPANghĩa
bug/bʌɡ/Lỗi phần mềm
defect/ˈdiː.fekt/Khiếm khuyết, lỗi
issue/ˈɪʃ.uː/Vấn đề, lỗi
regression/rɪˈɡreʃ.ən/Lỗi quay lại (tính năng cũ hỏng)
intermittent/ˌɪn.tərˈmɪt.ənt/Lỗi xảy ra không đều, lúc có lúc không
reproducible/ˌriː.prəˈdjuː.sə.bəl/Có thể tái hiện
flaky/ˈfleɪ.ki/Không ổn định (test lúc pass lúc fail)
root cause/ruːt kɔːz/Nguyên nhân gốc
workaround/ˈwɜːrk.ə.raʊnd/Giải pháp tạm thời
hotfix/ˈhɒt.fɪks/Bản vá khẩn cấp
edge case/edʒ keɪs/Trường hợp biên, hiếm gặp
stack trace/stæk treɪs/Thông tin lỗi chi tiết từ hệ thống
to reproduce/tə ˌriː.prəˈdjuːs/Tái hiện (lỗi)
to escalate/tə ˈes.kə.leɪt/Đẩy lên cấp cao hơn
to triage/tə triˈɑːʒ/Phân loại và ưu tiên bug
blocker/ˈblɒk.ər/Lỗi chặn không thể tiếp tục
showstopper/ˈʃoʊˌstɒp.ər/Lỗi nghiêm trọng, dừng cả release

6. Mẫu câu dùng trong Bug Report

Mô tả Actual Result

  • The page returns a 500 Internal Server Error.
  • The application crashes when clicking the submit button.
  • The data is not saved to the database.
  • The API returns an empty response instead of the user list.
  • The file upload hangs indefinitely without any error message.
  • The page redirects to a 404 after form submission.

Mô tả Expected Result

  • The user should be redirected to the dashboard.
  • The form should display a success message.
  • The API should return a 200 status with the updated data.
  • The file should be uploaded and appear in the file list.
  • The error message should be shown to the user.

Ghi thêm thông tin

  • This issue is reproducible 100% of the time.
  • This issue occurs intermittently — approximately 3 out of 10 attempts.
  • This seems to be a regression introduced in v2.3.0.
  • The issue only occurs on mobile devices / Chrome / production environment.
  • I was unable to reproduce this on staging.
  • See attached screenshot / video / console log for reference.
  • This is a blocker for the upcoming release.
  • A possible workaround is to clear the cache and retry.

7. Ví dụ Bug Report thực tế

Ví dụ 1 — Jira Issue

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
**Title:** [Checkout] — Payment fails with 502 error for orders over $500

**Environment:**
- Production (app.example.com)
- Chrome 122.0, macOS 14.3
- App version: v3.1.2

**Steps to Reproduce:**
1. Log in as a regular user
2. Add items to cart (total > $500)
3. Proceed to checkout
4. Select "Credit Card" as payment method
5. Enter valid card details
6. Click "Place Order"

**Actual Result:**
A 502 Bad Gateway error is displayed. The order is NOT created.
Console shows: `POST /api/orders — 502 (Bad Gateway)`

**Expected Result:**
The order should be created and the user should see the order confirmation page.

**Severity:** Critical (S1)
**Priority:** P1 — Urgent

**Additional Notes:**
- Orders under $500 work fine
- This started happening after the deployment on March 1st
- Likely a regression from PR #1247 (payment gateway timeout change)
- Affects approximately 15% of daily orders

Ví dụ 2 — GitHub Issue

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
## Bug: Dark mode toggle doesn't persist after page refresh

### Environment
- Browser: Firefox 123.0
- OS: Ubuntu 22.04
- Version: v1.8.0

### Steps to Reproduce
1. Open the app in Firefox
2. Go to Settings > Appearance
3. Toggle "Dark Mode" ON
4. Confirm the UI switches to dark theme
5. Refresh the page (F5)

### Actual Result
The app reverts to light mode after refresh. The toggle is OFF.

### Expected Result
Dark mode preference should persist across sessions
(stored in localStorage or user preferences).

### Severity
Minor (S3) — workaround: toggle dark mode each time

### Screenshots
| Before refresh | After refresh |
|---------------|--------------|
| 🌙 Dark mode ON | ☀️ Light mode (reverted) |

8. Những lỗi phổ biến khi viết Bug Report

❌ Sai✅ ĐúngTại sao
“It doesn’t work”“Returns 500 error when…”Quá mơ hồ, developer không biết fix gì
Không ghi stepsLiệt kê từng bướcDeveloper không thể tái hiện
“I think it’s a backend bug”Mô tả hiện tượng, để dev phân tíchĐừng đoán root cause
Không ghi environmentGhi rõ OS, browser, versionBug có thể chỉ xảy ra trên 1 môi trường
Gộp nhiều bug vào 1 ticketMỗi bug 1 ticket riêngDễ track, dễ assign, dễ close
Screenshot không có contextScreenshot + highlight vùng lỗiHình phải chỉ rõ vấn đề

9. Bài tập thực hành

Bài 1: Viết Bug Title

Viết lại title cho các bug sau:

  1. “Upload doesn’t work” → ___
  2. “Error on dashboard” → ___
  3. “Slow page” → ___
  4. “Can’t login” → ___
💡 Gợi ý đáp án
  1. [File Upload] — JPEG files fail to upload with “File too large” error (actual size: 2MB, limit: 10MB)
  2. [Dashboard] — Charts fail to render with TypeError when date range exceeds 30 days
  3. [Product List] — Page takes 15+ seconds to load when displaying 1000+ items
  4. [Login] — “Invalid credentials” error for valid accounts after password reset

Bài 2: Viết Bug Report hoàn chỉnh

Tình huống: Bạn đang test tính năng search trên trang e-commerce. Khi tìm kiếm với keyword có ký tự đặc biệt (ví dụ: "iPhone 15" case), kết quả trả về trống dù có sản phẩm match.

Hãy viết một bug report đầy đủ bằng tiếng Anh bao gồm: Title, Environment, Steps to Reproduce, Actual Result, Expected Result, Severity, Priority.

Bài 3: Phân loại Severity + Priority

BugSeverityPriority
App crash khi mở camera trên iOS 17______
Favicon hiển thị sai trên tab trình duyệt______
Không thể reset password qua email______
Thanh search không align đúng trên mobile______
💡 Gợi ý đáp án
BugSeverityPriority
App crash khi mở camera trên iOS 17Critical (S1)P1
Favicon hiển thị sai trên tab trình duyệtTrivial (S4)P4
Không thể reset password qua emailMajor (S2)P1
Thanh search không align đúng trên mobileMinor (S3)P3

Kết luận

Viết Bug Report tốt là một kỹ năng chuyên nghiệp — không chỉ cho QA mà cho cả developer. Một bug report rõ ràng giúp tiết kiệm hàng giờ debug và giảm back-and-forth trong team.

Checklist trước khi submit bug:

  • ✅ Title cụ thể, rõ ràng
  • ✅ Steps to Reproduce đầy đủ, đánh số
  • ✅ Actual vs Expected Result rõ ràng
  • ✅ Severity + Priority phù hợp
  • ✅ Có screenshot/log/video nếu cần
  • ✅ Ghi rõ environment

Hãy lưu template ở phần 1 và dùng cho mọi bug report từ hôm nay nhé! 🐛


Bạn thấy bài viết hữu ích? Hãy chia sẻ cho đồng nghiệp developer cùng đọc!


📚 Bài viết liên quan