What is Test Driven Development

What is Test Driven Development

Still on the issue of unit testing, we have a popular concept called Test Driven Development (TDD). There sometimes exist a conflict of interest when developers have to write their own unit test, a lot of times developers write unit test in a bid to rubber stamp their earlier written code, it defeats the purpose of unit testing being an independent regulator to ensure the core logic of a software solution is reserved.

TDD aims to reduce the possibility of comprising a unit test. With TDD, the software engineer is meant to write the test before the main code (which the test is supposed to evaluate). In lighter terms, the developer has to ensure that the egg comes before the chicken in this evolutionary trend. Why this is done is because when tests are written first, the software engineer can't fall for the subconscious trap of trying to force the test to pass in a bid to validate the main code.