Practice question · Multiple choice
A test suite passes and the program is wrong. Which of these does testing structurally fail to catch?
Hints
- Ask what a test suite is a sample of.
- The other three options describe things a test would catch. Which one leaves no trace?
Show the answer
D. A missing case nobody thought to test
Why
Tests are a finite sample of intended behaviour, so a case you never considered produces no failing test, there is nothing to fail. That is Dijkstra's point about presence and absence of bugs, and why coverage metrics mislead: they measure lines executed, never the requirement you forgot.
Practise Programming for Mathematics
The app has 6 more questions on this lesson, and keeps your place in the course. Mathematics I is free to start.
More questions on Programming for Mathematics
- Sort each task by the kind of computation it needs.
- In a Monte Carlo estimate of pi, points are scattered in a unit square containing a quarter-circle and the…
- Complete the description of a simulated result.
- Testing a program on a hundred inputs and finding no failures does not prove it correct. Why is testing…
- Order the steps of using a program to investigate a conjecture.
- Because a computer performs arithmetic faster and more reliably than a human, a numerical result it prints…