Lesson 8 of 81970–today7 min
Testing basics
On 4 June 1996 the first Ariane 5 rocket veered off course about 40 seconds after lift-off and was destroyed. The inquiry board found that software reused from Ariane 4 converted a 64-bit floating-point value related to horizontal velocity into a 16-bit signed integer. On the faster Ariane 5 the value exceeded 32,767, the largest such integer, and the conversion raised an exception that shut down both inertial reference units.
The code had worked perfectly on Ariane 4. It had simply never been tested with the flight data of the new rocket. Tests only protect you against the cases you thought to write.
The rest of this lesson is part of Pro
Create a free account to read the first lesson of every path, and go Pro for the rest.
Sources
- ARIANE 5 Flight 501 Failure: Report by the Inquiry Board (1996) — European Space Agency (mirror, University of Minnesota)
- Notes on Structured Programming (EWD249) — E. W. Dijkstra Archive, University of Texas at Austin
- unittest: Unit testing framework — Python documentation
- pytest documentation — pytest