Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
se:tdd [2009-06-16 15:52] stefan angelegt |
se:tdd [2014-04-05 11:42] (aktuell) |
||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
====== Test Driven Development ====== | ====== Test Driven Development ====== | ||
+ | \cite[S. ix]{Beck2003} In TDD, we | ||
+ | * write new code only if an automated test has failed | ||
+ | * eliminate duplication. | ||
+ | The TDD mantra \cite[S. x]{Beck2003} | ||
+ | - red: write a little test that doesn't work, and perhaps doesn't even compile at first. | ||
+ | - green: make the test work quickly, committing whatever sins necessary in the process. | ||
+ | - refactor: eliminate all of the duplication created in merely getting the test to work. | ||
+ | |||
+ | The rhythm of TDD \cite[S. 1]{Beck2003} | ||
+ | - quickly add a test | ||
+ | - run all tests and see the new one fail | ||
+ | - make a little change | ||
+ | - run all tests and see them all succeed | ||
+ | - refactor to remove duplication |