| |
- What is the main idea of test-driven development?
- What is the goal of test-driven development?
- How does a test-driven development cycle look like?
http://en.wikipedia.org/wiki/Test-driven_development
http://www.agiledata.org/essays/tdd.html
1. What is TDD?
The steps of test first development (TFD) are overviewed in the UML activity diagram of Figure 1. The first step is to quickly add a test, basically just enough code to fail. Next you run your tests, often the complete test suite although for sake of speed you may decide to run only a subset, to ensure that the new test does in fact fail. You then update your functional code to make it pass the new tests. The fourth step is to run your tests again. If they fail you need to update your functional code and retest. Once the tests pass the next step is to start over (you may first need to refactor any duplication out of your design as needed, turning TFD into TDD).

Figure 1. The Steps of test-first development (TFD).
What is the primary goal of TDD?One view is the goal of TDD is specification and not validation (Martin, Newkirk, and Kess 2003).In other words, it¡¦s one way to think through your design before your write your functional code.Another view is that TDD is a programming technique.As Ron Jeffries likes to say, the goal of TDD is to write clean code that works. |
| | Posted 4/6/2006 2:36 AM - 17 Views - 0 eProps - 0 comments
- recommend
    - recs0
- share
- email
 - sent0
Give eProps or Post a Comment |