0
0
Testing Fundamentalstesting~20 mins

Shift-left testing in Testing Fundamentals - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Shift-left Testing Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2: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?
AAfter the software is fully developed and ready for release
BDuring the requirements and design phases before coding begins
COnly during the final system testing phase
DAfter deployment to production
Attempts:
2 left
💡 Hint
Think about catching defects as early as possible to save time and cost.
Predict Output
intermediate
2: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")
AShift-left test coverage: 90% requirements, 70% unit, 80% integration
BShift-left test coverage: 70% requirements, 80% unit, 90% integration
CShift-left test coverage: 80% requirements, 90% unit, 70% integration
DShift-left test coverage: 80% unit, 90% integration, 70% requirements
Attempts:
2 left
💡 Hint
Check the variable names and their values carefully.
assertion
advanced
2: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
Aassert defects_shift_left < defects_late, "Shift-left defects should be fewer"
Bassert defects_shift_left == defects_late, "Defects count should be equal"
Cassert defects_shift_left > defects_late, "Shift-left defects should be fewer"
Dassert defects_shift_left >= defects_late, "Shift-left defects should be fewer"
Attempts:
2 left
💡 Hint
Remember, fewer means less than.
🔧 Debug
advanced
2: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)
AMissing colon after for loop declaration causes SyntaxError
BThe print statement syntax is incorrect
CThe function returns True even if a test fails
DThe lambda functions do not return boolean values
Attempts:
2 left
💡 Hint
Check the for loop syntax carefully.
framework
expert
2: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?
ASupport for manual exploratory testing sessions
BAbility to generate detailed final test reports after all tests complete
CIntegration with production monitoring tools for live error tracking
DSupport for parallel test execution to reduce test run time
Attempts:
2 left
💡 Hint
Think about speeding up early test feedback.