Course outline: Test design
Module 02 · Test design
Defect management and the bug life cycle
A defect is only useful once someone can reproduce it. How to report one well and follow it from New to Closed.
What you'll be able to do
- Tell an error, a defect and a failure apart, and name the common causes of bugs.
- Write a bug report that a developer can reproduce without asking you a question.
- Set severity and priority separately, and give a reason for each.
- Follow a bug through its life cycle, from New to Closed, with its retest and regression.
What is a Bug / Defect?
In software, a defect (often called a bug) is any deviation from the expected behavior or requirements. It's a flaw that can cause the application to produce incorrect results, behave unexpectedly, or fail entirely. Identifying and managing these defects is a critical part of ensuring software quality.
Key Terminology
Common Causes of Bugs
Incorrect Implementation
Code doesn't match the specified logic. Example: Clicking 'Save' deletes the record instead.
Missing Functionality
A required feature is not implemented. Example: The 'Export to CSV' button is absent.
Unexpected Interactions
Different modules interfere negatively. Example: Enabling dark mode breaks the search functionality.
Poor Design/Architecture
Fundamental design flaws lead to issues. Example: System slows down drastically with more than 10 users.
Environment Issues
Problems specific to certain OS, browsers, or configurations.
Third-Party Code
Bugs originating from external libraries or APIs.
Popular Bug Tracking Tools
(Tool choice often depends on project size, methodology, and budget.)
Effective Bug Reporting
Why Report Effectively?
Clear, concise, and complete bug reports are essential. They help developers understand and reproduce the issue quickly, leading to faster fixes and saving valuable project time. Good reporting fosters better collaboration between QA and development teams.
Key Elements of a Bug Report:
Bug Title
Bug ID
Project/Module
Environment
Severity
Priority
Status
Reported By
Reported On
Assigned To
Steps to Reproduce
Expected Result
Actual Result
Attachments
Notes/Comments
Tip: Many teams use standardized templates within their bug tracking tools to ensure consistency.
The Bug Life Cycle
The Defect (or Bug) Life Cycle defines the sequence of states a defect goes through from its initial discovery to its final resolution. Understanding this cycle helps teams track progress and manage defects efficiently.
Bug is logged for the first time.
Bug is assigned to a developer.
Developer starts working on the fix.
Developer has applied a fix.
Fix is ready for QA verification.
QA is actively verifying the fix.
QA confirms the fix is working.
Fix didn't work; bug sent back.
Bug is resolved and verified.
Considered not a valid defect.
Same as another reported bug.
Fix postponed to a later release.
Note: The specific states and transitions can vary slightly depending on the project's workflow and tracking tool configuration.
Worked example · Cedar Books
BUG-07 from discovery to closure
BUG-07 is a real bug of Cedar Books, the Academy's practice shop, and the template bug tracker follows it. Here is its whole life, step by step.
Discovery. On 8 Dec, on build 2.4.0-rc2, test case TC-09 clicks Apply twice within a second on a basket of 19.00 with CEDAR10. It expects one discount line and a total of 17.10; it gets two discount lines and a total of 15.39. A failed test is not yet a bug report: first, reproduce.
Reproducing. Karim, the tester, runs the steps again. With a quick double click it fails each time he tries; with a single click, never. Now he knows what triggers it, and a developer can see the bug in a minute instead of guessing.
The report. The title names the place and the symptom (the tracker's: "Coupon applied twice on a double click"). The expected result quotes the requirement, REQ-03: a valid code lowers the total once. The actual result gives the numbers, and the evidence is a screenshot of the two discount lines and of the two calls to /api/coupons/apply in the browser's Network tab. The full report is the worked example on the templates page; in the bug report lab you write your own first.
Severity against priority. Severity is how much damage a bug does; priority is how soon it must be fixed. They are set separately. BUG-07 takes money off wrongly for any shopper who double-clicks, in the feature the release is for: the tracker records severity High and priority P1. The two do not always move together:
| Severity | Fix later (low priority) | Fix now (high priority) |
|---|---|---|
| High severity | A crash in a yearly report that runs in six months | BUG-07: money taken off wrongly in the main feature of the release |
| Low severity | A slightly misaligned icon on a help page | The shop's name misspelt on the home page the day before launch |
The life cycle. BUG-07 moves through the states of this lesson:
- New: Karim logs it on 8 Dec. The template tracker still shows it New, with nobody assigned.
- Assigned: at the morning triage the QA lead and the development lead review it: severity High, as QA proposed, and priority P1, which the product owner confirms. It goes to a developer.
- Open: the developer reproduces it and finds the cause.
- Fixed: the fix is in build 2.4.0-rc4.
- Pending retest, then Retest: Karim runs the steps of TC-09 on rc4: one discount line, a total of 17.10.
- Verified: the fix works. Had it failed, the bug would have gone back as Reopened.
- Closed: after the regression run passes, before the sign-off on 18 Dec.
Retest and regression. The retest proves this bug is gone; the regression run proves the fix broke nothing else (the testing types lesson walks through both on rc4, in after an urgent coupon fix). TC-09 stays in the regression suite, so BUG-07 cannot come back unnoticed.
Try it: The bug report lab · Bug report builder
Effective Defect Management is Key
A systematic approach to defect management, including clear reporting and understanding the life cycle, is crucial for delivering high-quality software. It improves communication, speeds up resolution times, and ultimately leads to a better end product.
Sign in to keep your progress: a tick here lives in this browser only.
Test yourself
Quiz: Defect management
10 questions, about 8 minutes. Sign in to take the quiz.
10 questions, about 8 minutes, no time limit. 7 right answers pass, and passing marks the lesson as read. Every new quiz draws new questions.