Test-driven development


  1. You may not write any production code when you do not have a failing test
  2. You may not write any test code when you have a failing test
  3. You may only write the least possible amount of produiction code to make the test pass


  1. Write failing test
  2. Write production code (making test pass)
  3. Refactor
  4. (Rinse and repeat)

Behavior driven development


  1. Given
  2. When
  3. Then

There’s a Python package called behave.