Saturday, September 02, 2006

Difference between Test First programming and TDD

I have seen people using the words "Test First Programming" and "Test Driven Development" interchangeably, which is wrong. There is a subtle difference between the two.

In Test first programming, you just write the test using xUnit family(mostly) and then you write your code. There is not much rule associated with it.

Test Driven Development is a special case of test first programming where there are certain rules defined. For Ex: You write the test first, ensure that the program fails, then you write the code to make the test work, and finally refactor. This cycle is continued.

No comments: