Test-driven development

Author: Kent Beck
Publisher:
Publish Date: 2004-03-01
Features: Imagine programming as turning a crank to lift a bucket of water out of a well. If the bucket is small, you only need a crank that can rotate freely. If the bucket is large and full of water, you'll get tired before the bucket is fully lifted. You need a ratchet mechanism to ensure you can rest after each rotation. The heavier the bucket, the closer the teeth of the ratchet. In test-driven development, test programs are the teeth of the ratchet. Once a test program works, you know it will work from now on and forever. Compared to a test program failing, you are one step closer to making all test programs work. Now our task is to make the next test program work, then the next, and so on. Analysis shows that the harder the problem to be programmed, the smaller the scope of each test should be.

📌 Related Posts