Hi Sharon, Test Driven Development (TDD) is an iterative process where each iteration starts with a set of tests written for a new piece of functionality. These tests are supposed to fail during the start of iteration and in the next phase of the iteration Application code is written with an intention to pass all the tests written earlier in the iteration. Some of the benefits of using Test Driven Development are:
- Unit test proves that the code actually works
- Can drive the design of the program
- Refactoring allow to improve the design of the code
- Low Level regression test suite
- Test first reduce the cost of the bugs
Despite of having so many benefits, TDD has following drawbacks:
- Developer can consider it as a waste of time
- The test can be targeted on verification of classes and methods and not on what the code really should do
- Test become part of the maintenance overhead of a project
- Rewrite the test when requirements change
Hope this helps!