Challenge - 5 Problems
Shift-left Testing Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
When is shift-left testing typically introduced in the software development lifecycle?
Shift-left testing means moving testing activities earlier in the development process. At which phase is shift-left testing ideally started?
Attempts:
2 left
💡 Hint
Think about catching defects as early as possible to save time and cost.
✗ Incorrect
Shift-left testing encourages starting testing activities early, such as during requirements and design, to find defects sooner and reduce costly fixes later.
❓ Predict Output
intermediate2:00remaining
What is the output of this test coverage print statement in shift-left testing?
Given this Python snippet simulating test coverage percentages at different phases, what will be printed?
Testing Fundamentals
requirements_coverage = 80 unit_test_coverage = 90 integration_test_coverage = 70 print(f"Shift-left test coverage: {requirements_coverage}% requirements, {unit_test_coverage}% unit, {integration_test_coverage}% integration")
Attempts:
2 left
💡 Hint
Check the variable names and their values carefully.
✗ Incorrect
The print statement uses the variables in order: requirements_coverage=80, unit_test_coverage=90, integration_test_coverage=70.
❓ assertion
advanced2:00remaining
Which assertion correctly verifies that defects found during shift-left testing are fewer than defects found later?
You have two variables: defects_shift_left = 5 and defects_late = 15. Which assertion correctly tests that shift-left testing finds fewer defects?
Testing Fundamentals
defects_shift_left = 5 defects_late = 15
Attempts:
2 left
💡 Hint
Remember, fewer means less than.
✗ Incorrect
The assertion must check defects_shift_left < defects_late to confirm fewer defects found early.
🔧 Debug
advanced2:00remaining
Identify the bug in this test automation code snippet related to shift-left testing
This Python code is meant to run unit tests early (shift-left). What is the bug that will cause it to fail?
Testing Fundamentals
def run_unit_tests(tests): for test in tests: result = test() if not result: print("Test failed") return False return True unit_tests = [lambda: True, lambda: False, lambda: True] run_unit_tests(unit_tests)
Attempts:
2 left
💡 Hint
Check the for loop syntax carefully.
✗ Incorrect
The for loop line is missing a colon at the end, causing a SyntaxError.
❓ framework
expert2:00remaining
Which testing framework feature best supports shift-left testing automation?
You want to automate tests early in development and get fast feedback. Which feature of a testing framework helps most with shift-left testing?
Attempts:
2 left
💡 Hint
Think about speeding up early test feedback.
✗ Incorrect
Parallel test execution allows running many tests quickly, enabling fast feedback early in development, which is key for shift-left testing.