[Home]History of TestDrivenDevelopment

FrontPage | RecentChanges | Preferences


Revision 3 . . (edit) October 10, 2007 1:02 pm by EmilyBache
Revision 2 . . October 10, 2007 12:57 pm by EmilyBache [text mostly moved here from RythmOfTestFirst since Rhythm has another h in it and this page was about TDD anyway.]
Revision 1 . . May 14, 2007 1:36 pm by backport.ri.fi
  

Difference (from prior major revision) (minor diff)

Changed: 1c1,19
TODO
TestDrivenDevelopment is a way of working, or a process for writing code. You work is paced in BabySteps and your progress is assured by frequently writing and running automated tests. Coding proceeds in an extremely focused and productive rhythm:

1. Write a test for a new function. The test should fail.

2. Write code until the test passes.

3. Refactor until the code is suitable for continued development

4. Goto 1.


If we use a UnitTestFramework?, like JUnit, we get nice colours on the screen telling us exactly what to do next.

* Red = write function code

* Green = write a new test or refactor

That is all what we are allowed to do. If we start breaking these simple rules we cannot stay focused, things gets complicated, we start forgetting pieces and we end up hoping that there is enough undo steps in our editor to get us out of the mess we created.


FrontPage | RecentChanges | Preferences
Search: