Test-driven Development (TDD)

Test-driven development (TDD) is a development technique where you must write a test that fails before you write new functional code.

Workflow

  1. Write a failing test
  2. Write code to make it pass.
  3. Repeat steps 1 and 2.
  4. Along the way, refactor aggressively.
  5. When you can’t think of any more tests, you must be done.

TTD workflow

TTD workflow

Source:
https://www.ibm.com/developerworks/library/j-eaed2/index.html
http://agiledata.org/essays/tdd.html

Written on March 3, 2018