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
It is claimed that TDD helps to write code that simple, flexible and just enough to satisfy the requirement.