Veteran software craftsman, experienced manager, entrepreneur, startup junkie, consultant, master generalist. John is a DZone MVB and is not an employee of DZone and has posted 10 posts at DZone. You can read more from them at their website. View Full User Profile

TDD Like You've Never Seen it Before

  • submit to reddit
Boulder, CO

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:
  1. Write a failing test case that encodes some behavior you need.
  2. Write just enough code to pass the test case in the simplest possible way.
  3. Refactor to improve the design of the code.
  4. Repeat until you have all the behavior you need.
In a new screencast published on Vimeo, agile software developer John A. De Goes demonstrates the basics of TDD in a shared development environment. The twenty-minute screencast shows John and two other developers as they TDD a basic Stack in the Java programming language.
Published at DZone with permission of John De Goes, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)