- It is just about writing the test before the program.
- It’s a testing technique as well as a design Technique.
- In the end, there is no code without a test.
- The developer can tell at any time.
- Unit Tests and Refactoring are the tools of TDD.
Unit Tests:
´ Easy to read & understand.
´ Execute very quickly.
´ Independent of execution
order.
´ Test specific aspects of
a functionality.
´ Tests a very small section of code isolation.
Rapid feedback
Refactoring
´ Take existing code & change it more efficient.
´ Change the internal structure of
code without changing its external
´ behavior. Ex :•ab + ac = a(b+c)
´ Same result, but the
expression is simplified.
Advantages
´ Gets running code very quickly.
´ Development in small steps. This will make debugging easier
since we will have small code chunks to debug.
´ Produce fully testable code.
´ Design to the specification, don’t over engineer
Disadvantages
´ “Write test, write code to pass test, repeat” loop is overly strict.
´ Setup requires some what
complex wiring.
´ Causes people to take paths they wouldn’t otherwise
No comments:
Post a Comment