Test Driven Development - raisercostin/software-wiki GitHub Wiki

TDD mantra

  1. define a practical goal:
    • bug: reproduce and then fix
    • feature: to add behaviour while keeping everything the same
  2. break/add a test :D
    • junit test ideally
    • specific manual steps - not ideally
  3. pre-cleanup, pre-design
    • Refactor to understand and/or prepare for new features
  4. fix the test (hack the fix) - cowboy programming, otherwise you fall for analytical paralysis
    • ideally using OCP
  5. cleanup (Refactor to reduce Technical Debt see also Broken Window Theory and Scout Rule
  6. repeat from 1

Why tests are helpful

  • good upfront design
  • focus on what is to be solved
  • focus on next dev session if the session was finished by locally breaking a test

See http://agiledata.org/essays/tdd.html

Kent Beck - TDD https://www.dropbox.com/s/h1c7wkdocmi6ii7/all%20-%20Kent%20Beck%20-%20Test%20Driven%20Development%20By%20Example%20%282002%29.pdf?dl=0