Tuesday, January 06, 2009

Test driven development in short.

This a post to express my understanding of test driven development.

Say you are a dev and you are given a clean slate and a spec, what do you do?
The first thing people do is to write the design code per the spec. Instead if you start writing the test cases and then start your dev code full filling each test case it becomes test driven development. The process is iterative, once few test cases are full filled, you go back and refactor the dev code to make it better. The process of continous refining, while full filling more test cases on each run is termed as test driven development.

This method is a best fit for developing API's. In a test driven development you as the dev becomes the first consumer. So if you do not like it, there is a very little chance that some one would.

1 comment:

@VELU said...

yeah so true, check out the M$ guidelines ...

its a solid way for refactoring code ...