Theory-infected: or how I learned to stop worrying and love universal quantification

D Saff - Companion to the 22nd ACM SIGPLAN conference on …, 2007 - dl.acm.org
D Saff
Companion to the 22nd ACM SIGPLAN conference on Object-oriented programming …, 2007dl.acm.org
Writing developer tests as software is built can provide peace of mind. As the software
grows, running the tests can prove that everything still works as the developer envisioned it.
But what about the behavior the developer failed to envision? Although verifying a few well-
picked scenarios is often enough, experienced developers know bugs can often lurk even in
well-tested code, when correct but untested inputs provoke obviously wrong responses. This
leads to worry. We suggest writing Theories alongside developer tests, to specify desired …
Writing developer tests as software is built can provide peace of mind. As the software grows, running the tests can prove that everything still works as the developer envisioned it. But what about the behavior the developer failed to envision? Although verifying a few well-picked scenarios is often enough, experienced developers know bugs can often lurk even in well-tested code, when correct but untested inputs provoke obviously wrong responses. This leads to worry.
We suggest writing Theories alongside developer tests, to specify desired universal behaviors. We will demonstrate how writing theories affects test-driven development, how new features in JUnit can verify theories against hand-picked inputs, and how a new tool, Theory Explorer, can search for new inputs, leading to a new, less worrysome approach to development.
ACM Digital Library