Skip to content
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.

  • 6 min read
  • Free, no sign-up

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

Defect
(A flaw or imperfection in a software component or system that causes it to fail to perform its required function.)
Bug
(An informal name for a defect, often used interchangeably.)
Error
(A human action that produces an incorrect result. Errors in code lead to defects.)
Issue
(A general term for a problem or concern, which might be a defect, enhancement request, or question.)
Mistake
(An error made by a person, often referring to errors in documentation or requirements.)
Failure
(The inability of a system or component to perform its required functions within specified performance requirements. Often the observable result of one or more defects.)

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.

Jira
Bugzilla
Azure DevOps (ADO)
Redmine
MantisBT
Asana
Trello
ClickUp

(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
Concise, unique, and descriptive summary of the issue.Example: 'User cannot log in with valid credentials on Chrome v120'
Bug ID
Unique identifier automatically assigned by the tracking tool.
Project/Module
Specific area of the application where the bug occurs.
Environment
System details (e.g., OS: Windows 11, Browser: Chrome v120, Device: Desktop).
Severity
Impact on functionality (e.g., Blocker, Critical, Major, Minor, Trivial). Determined by QA.Example: Blocker - Prevents core functionality; Trivial - Minor UI cosmetic issue.
Priority
Urgency to fix (e.g., High, Medium, Low). Determined by Product Owner/Manager.Example: High - Must fix before release; Low - Fix if time permits.
Status
Current state in the bug life cycle (e.g., New, Assigned, Fixed, Closed).
Reported By
Name/ID of the person who found the bug.
Reported On
Date and time the bug was logged.
Assigned To
Developer or team responsible for fixing the bug.
Steps to Reproduce
Clear, numbered steps to reliably trigger the bug.
Expected Result
What should have happened according to requirements.
Actual Result
What actually happened when the steps were followed.
Attachments
Screenshots, videos, logs, or other relevant files.
Notes/Comments
Any additional context, observations, or discussion.

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.

New

Bug is logged for the first time.

Assigned

Bug is assigned to a developer.

Open

Developer starts working on the fix.

Fixed

Developer has applied a fix.

Pending Retest

Fix is ready for QA verification.

Retest

QA is actively verifying the fix.

Verified

QA confirms the fix is working.

Reopened

Fix didn't work; bug sent back.

Closed

Bug is resolved and verified.

Rejected

Considered not a valid defect.

Duplicate

Same as another reported bug.

Deferred

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 against priority, with examples
SeverityFix later (low priority)Fix now (high priority)
High severityA crash in a yearly report that runs in six monthsBUG-07: money taken off wrongly in the main feature of the release
Low severityA slightly misaligned icon on a help pageThe shop's name misspelt on the home page the day before launch

The life cycle. BUG-07 moves through the states of this lesson:

  1. New: Karim logs it on 8 Dec. The template tracker still shows it New, with nobody assigned.
  2. 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.
  3. Open: the developer reproduces it and finds the cause.
  4. Fixed: the fix is in build 2.4.0-rc4.
  5. Pending retest, then Retest: Karim runs the steps of TC-09 on rc4: one discount line, a total of 17.10.
  6. Verified: the fix works. Had it failed, the bug would have gone back as Reopened.
  7. 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.

Sign inRequest accessStart freeGet started

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.

Put the lessons to work on a real site

Describe a user journey in plain English. QAIA walks it in a real browser and hands back the test cases, the automation code and the evidence of every step.