Computer Science I / Testing Larger Behaviours
Practice question · Select all that apply

Every unit test in a project passes. Select every kind of defect that could still be present.

Hints
  1. Unit tests check single units in isolation against the inputs the tests happen to choose.
  2. Two options describe failures that a passing unit test suite would already have exposed.
Show the answer
  • C. A function returns the wrong value for an input no test supplies
  • D. Two modules disagree about the format of the data they exchange
  • E. The program is unusable end to end even though each part works
Why

Isolation is the blind spot: interface disagreements and end-to-end failures survive a green unit suite, as do inputs nobody thought to test. A function failing on its own test input, or code that will not compile, could not coexist with a passing suite, which is why integration and system tests sit above the unit level rather than replacing it.

Read the lesson: Testing Larger Behaviours →

Practise Testing Larger Behaviours

The app has 6 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.

More questions on Testing Larger Behaviours