0
0
Testing Fundamentalstesting~6 mins

Defect classification (severity, priority) in Testing Fundamentals - Full Explanation

Choose your learning style9 modes available
Introduction
When software has problems, it is important to decide how serious they are and how quickly they should be fixed. Without a clear way to classify these problems, teams can waste time fixing less important issues first or miss critical bugs that affect users.
Explanation
Severity
Severity measures how much a defect affects the software's functionality or user experience. It focuses on the technical impact, such as whether the software crashes, produces wrong results, or has minor display issues. Severity is usually set by testers or developers based on the defect's effect on the system.
Severity shows how serious the defect's impact is on the software.
Priority
Priority indicates how soon a defect should be fixed, based on business needs or project deadlines. It considers factors like customer importance, release schedules, or dependencies. Priority is often set by project managers or product owners to guide the development team's work order.
Priority determines the order in which defects should be addressed.
Real World Analogy

Imagine a busy restaurant kitchen where some problems happen: a broken oven (stops cooking), a missing spoon, or a slightly messy counter. The broken oven is very serious and needs immediate fixing, while the missing spoon is less serious but might be needed soon. The kitchen manager decides which problem to fix first based on how it affects cooking and serving customers.

Severity → How badly the broken oven stops cooking food, affecting the kitchen's work
Priority → The kitchen manager deciding to fix the oven first because it blocks cooking, even if other issues exist
Diagram
Diagram
┌─────────────┐       ┌─────────────┐
│   Defect    │──────▶│  Severity   │
│  Reported   │       │ (Impact on  │
└─────────────┘       │  software)  │
                       └─────┬───────┘
                             │
                             ▼
                       ┌─────────────┐
                       │  Priority   │
                       │ (Fix order) │
                       └─────────────┘
This diagram shows how a defect is first assessed for severity (impact) and then assigned a priority (fix order).
Key Facts
SeverityMeasures the technical impact of a defect on the software's functionality.
PriorityIndicates how soon a defect should be fixed based on business needs.
High SeverityDefects causing crashes or loss of data.
Low PriorityDefects that can be fixed later without affecting release schedules.
Code Example
Testing Fundamentals
class Defect:
    def __init__(self, description, severity, priority):
        self.description = description
        self.severity = severity  # e.g., 'High', 'Medium', 'Low'
        self.priority = priority  # e.g., 'Urgent', 'Normal', 'Low'

    def info(self):
        return f"Defect: {self.description}\nSeverity: {self.severity}\nPriority: {self.priority}"

# Example defects
bug1 = Defect("App crashes on login", "High", "Urgent")
bug2 = Defect("Typo in help text", "Low", "Low")

print(bug1.info())
print(bug2.info())
OutputSuccess
Common Confusions
Severity and priority mean the same thing.
Severity and priority mean the same thing. Severity is about how bad the defect is technically, while priority is about how quickly it should be fixed based on business decisions.
Only high severity defects get high priority.
Only high severity defects get high priority. A defect with low severity can have high priority if it affects important customers or deadlines.
Summary
Severity measures how badly a defect affects the software's function or user experience.
Priority decides how quickly a defect should be fixed based on business needs.
Understanding both helps teams fix the most important problems first.