Chapter 2
Classic TDD I – Test-Driven Development
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
– Martin Fowler
When I was developing software for automated cash machines, we created a simple Graphical User Interface (GUI) to test our code. The GUI was a plain window full of small buttons, each performing a specific operation.
To perform a test, an operator would press the buttons on the GUI. The granularity of the operations was so fine that to run a test, an operator had to press several buttons in a specific sequence.
We did not have automated sequences, nor were we generating any reports. Nevertheless, we were very proud of our test GUIs. The quality assurance engineers loved them, and they were a lifesaver on many occasions.
This had little resemblance to Test-Driven Development (TDD), but at that time, TDD had not been invented yet. However, the high value provided by...