0
0
Testing Fundamentalstesting~20 mins

What software testing is in Testing Fundamentals - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Software Testing Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Purpose of Software Testing
Why do we perform software testing in a project?
ATo find and fix errors before users see the software
BTo add new features to the software
CTo make the software run faster
DTo write documentation for the software
Attempts:
2 left
💡 Hint
Think about what testing helps prevent for users.
Predict Output
intermediate
2: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)
ASkipped
BFail
CError
DPass
Attempts:
2 left
💡 Hint
Check the number of failed tests.
assertion
advanced
2: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'
Aassert login('admin', '1234') == True
Bassert login('admin', '1234') is False
Cassert login('user', '1234') == True
Dassert login('admin', 'wrong') == True
Attempts:
2 left
💡 Hint
Check which credentials are valid in the function.
🔧 Debug
advanced
2: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
AAssertionError because result is not 6
BSyntaxError due to wrong assertion syntax
CTypeError because sum is used incorrectly
DNo error, test passes
Attempts:
2 left
💡 Hint
Look carefully at the assert statement syntax.
framework
expert
2:00remaining
Choosing the Best Test Framework Feature
Which feature is most important in a test framework to support automated regression testing?
AGenerating colorful test reports only
BSupport for manual test case writing
CAbility to run tests automatically on code changes
DProviding a GUI for test case design
Attempts:
2 left
💡 Hint
Regression testing needs frequent automatic runs.