Test driven development
Test driven development (TDD) is a popular approach for writing unit tests.
With this approach, we write a test first, see it fail, then write production code to make the test pass.
Typically, we repeat the steps below in that order
- take a small requirement
- write failing test for the requirement
- write production code to make test pass
- refactor
It is claimed that TDD helps to write code that simple, flexible and just enough to satisfy the requirement.
Comments
comments powered by Disqus