Test Driven Development - raisercostin/software-wiki GitHub Wiki
TDD mantra
- define a practical goal:
- bug: reproduce and then fix
- feature: to add behaviour while keeping everything the same
- break/add a test :D
- junit test ideally
- specific manual steps - not ideally
- pre-cleanup, pre-design
- Refactor to understand and/or prepare for new features
- fix the test (hack the fix) - cowboy programming, otherwise you fall for analytical paralysis
- ideally using OCP
- cleanup (Refactor to reduce Technical Debt see also Broken Window Theory and Scout Rule
- 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