- Write a failing test.
- Make the test pass as fast as possible.
- Refactor existing or add new tests.
- Make those new/refactored tests pass.
Was having a conversation at the office today about TDD. Talking about TDD with some of my co-workers who still develop in a more traditional manner motivated me to write an introduction to TDD for them. I know, I know, there are plenty on the web, but this little write up serves two purposes. One, help my co-workers who aren't familiar with some of the TDD ways learn how and why we (the TDD collective) develop the way we do. Two, the more you talk about write about a topic, the better you get at that topic. TDD goes something like this.