Quotation Technology Computing
Program testing can be used to show the presence of bugs, but never to show their absence!
Edsger Dijkstra Notes on Structured Programming · 1969

Dijkstra distinguishes finding an error from proving that no errors remain. A test that exposes incorrect behaviour can demonstrate a defect. Passing selected tests, however, does not establish that a program behaves correctly for every possible input and condition. Faults may remain in cases the tests have not covered.

In the surrounding discussion, he argues that exhaustive testing is impractical for complex systems. He therefore advocates designing programs whose structure supports reasoned demonstrations of correctness, rather than relying solely on observed results. This makes correctness a concern during construction, not merely a matter of checking the finished program.

The quotation warns against treating successful tests as a guarantee, rather than dismissing testing as useless. Its practical lesson is to distinguish evidence of reliability from proof. Mathematical verification also has limits: its conclusions depend on the stated requirements and assumptions under which the program is analysed.

✓Copied