Which statement best explains why unit tests and system tests catch different types of bugs?
Think about the size of the code each test level looks at.
Unit tests check small pieces of code alone, so they find bugs inside those pieces. System tests check the whole app working together, so they find bugs in how parts interact.
Why can integration testing find bugs that unit testing might miss?
Think about what integration testing focuses on compared to unit testing.
Integration testing looks at how modules connect and work together, so it finds bugs in their communication that unit tests, which test modules separately, do not catch.
Given the following test results, which testing level likely caught the bug?
Test Results: - Unit Test: Passed - Integration Test: Failed - System Test: Passed
What does this suggest about the bug?
Look at which test failed and what it tests.
Unit tests passed, so individual parts work. System tests passed, so the whole system works. Integration test failed, so the problem is in how parts connect.
Which assertion best checks that a bug found during system testing is fixed?
def test_system_feature(): result = run_full_system_feature() # Which assertion below is best here?
Think about what confirms the feature works correctly.
Checking the exact output matches expected confirms the bug fix. Other assertions check only type or presence, not correctness.
You are designing tests for a new feature that involves multiple modules and user interaction. Which testing levels should you include to catch different bugs effectively?
Think about the strengths of each testing level and what bugs they catch.
Unit tests catch bugs inside modules, integration tests catch bugs in module connections, and system tests catch bugs in the full feature including user interaction. Using all three covers all bug types.