Challenge - 5 Problems
Software Testing Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Purpose of Software Testing
Why do we perform software testing in a project?
Attempts:
2 left
💡 Hint
Think about what testing helps prevent for users.
✗ Incorrect
Software testing helps find bugs early so users get a better experience.
❓ Predict Output
intermediate2:00remaining
Test Result Interpretation
What will be the output of this test result summary?
Testing Fundamentals
tests = {'passed': 8, 'failed': 2, 'skipped': 0}
if tests['failed'] > 0:
result = 'Fail'
else:
result = 'Pass'
print(result)Attempts:
2 left
💡 Hint
Check the number of failed tests.
✗ Incorrect
Since there are 2 failed tests, the result is 'Fail'.
❓ assertion
advanced2:00remaining
Valid Assertion for Login Function
Which assertion correctly checks that the login function returns True for valid credentials?
Testing Fundamentals
def login(user, password): return user == 'admin' and password == '1234'
Attempts:
2 left
💡 Hint
Check which credentials are valid in the function.
✗ Incorrect
Only login('admin', '1234') returns True; others return False.
🔧 Debug
advanced2:00remaining
Identify the Testing Code Error
What error will this test code raise when run?
Testing Fundamentals
def test_sum(): result = sum([1, 2, 3]) assert result == 6
Attempts:
2 left
💡 Hint
Look carefully at the assert statement syntax.
✗ Incorrect
The assert statement uses '==' correctly, so no syntax error occurs.
❓ framework
expert2:00remaining
Choosing the Best Test Framework Feature
Which feature is most important in a test framework to support automated regression testing?
Attempts:
2 left
💡 Hint
Regression testing needs frequent automatic runs.
✗ Incorrect
Automated runs on code changes help catch regressions quickly.