TDD Like You've Never Seen it Before
Test-driven development is a popular (but not yet mainstream) practice for developing software in fully-working increments of functionality. Advocates claim it results in well-designed code that "just works", accompanied by "living documentation" in the form of automated tests.
Test-driven development, or TDD, consists of the following loop:
- Write a failing test case that encodes some behavior you need.
- Write just enough code to pass the test case in the simplest possible way.
- Refactor to improve the design of the code.
- Repeat until you have all the behavior you need.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)