Wednesday, July 22, 2015

Test Driven Development (TDD)

TDD Life Cycle

1) Write the test.

2) Run the test (There is no implementation code, test does not pass).

3) Write just enough implementation code to make the test pass.

4) Run all tests (Tests pass).

5) Refactor.

6) Repeat.


The Resulting code is -

1) Very well tested.

2) Almost self documented.

3) Easy to maintain.

4) Easy to learn by another developer.

5) Safe to refactor.

No comments:

Post a Comment

Home