0
0
Testing Fundamentalstesting~20 mins

Defect reporting best practices in Testing Fundamentals - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
πŸŽ–οΈ
Defect Reporting Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Key elements in a defect report

Which of the following is NOT a key element to include in a clear defect report?

AExpected and actual results
BTester’s personal opinion about the developer
CEnvironment details like browser or OS version
DSteps to reproduce the defect
Attempts:
2 left
πŸ’‘ Hint

Think about what information helps fix the defect, not personal feelings.

❓ assertion
intermediate
2:00remaining
Correct assertion for defect severity

You want to write an assertion to check if a defect's severity is set to 'Critical'. Which assertion is correct?

Testing Fundamentals
defect = {'id': 101, 'severity': 'Critical'}

# Choose the correct assertion below:
Aassert defect.get('severity') == 'Critical'
Bassert defect['severity'] == 'critical'
Cassert defect['severity'] = 'Critical'
Dassert defect['severity'] != 'Critical'
Attempts:
2 left
πŸ’‘ Hint

Remember Python is case-sensitive and assignment '=' is not used in assertions.

πŸ”§ Debug
advanced
2:00remaining
Identify the error in defect report code

What error will this defect report submission code raise?

Testing Fundamentals
def submit_defect(defect):
    if defect['title'] and defect['description']:
        print('Defect submitted')
    else:
        print('Missing information')

submit_defect({'title': 'Crash', 'description': 'App crashes on start'})
ATypeError because defect is not a dictionary
BKeyError because 'title' key is missing
CSyntaxError due to missing colon after else
DNo error, prints 'Defect submitted'
Attempts:
2 left
πŸ’‘ Hint

Check the syntax of if-else statements carefully.

❓ framework
advanced
2:00remaining
Best practice for defect tracking tool usage

Which practice is best when using a defect tracking tool?

AUpdate defect status promptly and add comments when progress is made
BOnly update defect status at the end of the testing cycle
CCreate multiple duplicate defect entries for the same issue to get faster attention
DAssign defects randomly without considering expertise
Attempts:
2 left
πŸ’‘ Hint

Think about clear communication and avoiding confusion.

❓ Predict Output
expert
2:00remaining
Output of defect report filtering code

What is the output of this Python code that filters defects by priority?

Testing Fundamentals
defects = [
    {'id': 1, 'priority': 'High'},
    {'id': 2, 'priority': 'Low'},
    {'id': 3, 'priority': 'Medium'},
    {'id': 4, 'priority': 'High'}
]

high_priority_ids = [d['id'] for d in defects if d['priority'] == 'High']
print(high_priority_ids)
A[2, 3]
B[]
C[1, 2, 3, 4]
D[1, 4]
Attempts:
2 left
πŸ’‘ Hint

Look for defects where priority equals 'High'.