0
0
Testing Fundamentalstesting~20 mins

Defect classification (severity, priority) in Testing Fundamentals - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Defect Classification Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding Defect Severity Levels

Which of the following best describes a defect with critical severity?

AA defect that causes the system to crash or lose data, blocking further testing or use.
BA defect that causes minor visual issues but does not affect functionality.
CA defect that affects performance slightly but does not stop the system from working.
DA defect that is related to spelling mistakes in the user interface.
Attempts:
2 left
💡 Hint

Think about defects that stop the system from working properly.

🧠 Conceptual
intermediate
1:30remaining
Priority vs Severity

Which statement correctly distinguishes priority from severity in defect classification?

ASeverity measures the impact on the system; priority measures how soon it should be fixed.
BPriority measures the impact on the system; severity measures how soon it should be fixed.
CSeverity and priority both measure the impact on the system equally.
DPriority and severity are the same and can be used interchangeably.
Attempts:
2 left
💡 Hint

Think about what each term controls in the defect fixing process.

data_output
advanced
2:00remaining
Classify Defects by Severity and Priority

Given the following defects data, what is the count of defects with high severity and high priority?

Testing Fundamentals
import pandas as pd

defects = pd.DataFrame({
    'id': [101, 102, 103, 104, 105],
    'severity': ['high', 'medium', 'high', 'low', 'high'],
    'priority': ['high', 'low', 'high', 'medium', 'medium']
})

result = defects[(defects['severity'] == 'high') & (defects['priority'] == 'high')].shape[0]
print(result)
A0
B3
C1
D2
Attempts:
2 left
💡 Hint

Filter defects where both severity and priority are 'high'.

🔧 Debug
advanced
1:30remaining
Identify the Error in Defect Priority Assignment Code

What error will this code produce when trying to assign priority based on severity?

def assign_priority(severity):
    if severity == 'critical':
        return 'high'
    elif severity == 'major':
        return 'medium'
    else:
        return 'low'

priority = assign_priority('major')
print(priority)
ATypeError because of wrong return type
BNameError because 'priority' is not defined
CSyntaxError due to missing colon after elif statement
DNo error, prints 'medium'
Attempts:
2 left
💡 Hint

Check the syntax of the if-elif statements carefully.

🚀 Application
expert
2:00remaining
Determine Final Defect Fix Order

You have this list of defects with severity and priority. Which defect should be fixed first based on highest priority and then highest severity?

defects = [
    {'id': 1, 'severity': 'medium', 'priority': 'high'},
    {'id': 2, 'severity': 'critical', 'priority': 'medium'},
    {'id': 3, 'severity': 'high', 'priority': 'high'},
    {'id': 4, 'severity': 'low', 'priority': 'low'}
]
ADefect with id 2
BDefect with id 3
CDefect with id 1
DDefect with id 4
Attempts:
2 left
💡 Hint

First sort by priority, then by severity to decide fix order.