Test Driven Development (TDD) is an approach to software development and refers to the practice of creating test cases first and developing the solution further from the initial test cases. For every small functionality of a solution TDD starts with designing and developing tests.
In traditional software development, developers use this approach to develop functionality enclosed in test cases to identify which code succeeds and which code fails. Failed test cases require new logic to be implemented or existing logic to be enhanced for the test to succeed. If an automated test fails to avoid duplicated code, the TDD framework indicates developers to write new code.