Test Driven Development (TDD)

Basu Bishal Bhashkar
2 min readSep 7, 2022

--

TDD, as the name suggests, it is the tests that guides the code to be written. It is bottom’s up thinking in a way wherein the developer puts down all the possible scenarios that are a must for the code to suffice. Therefore, the development becomes test centric which in turn acts as an user centric approach.

Test-Driven Development (TDD) is an Agile testing practice that improvises the system outcomes also referred to as the ‘test-first’ approach. BDD i.e. Behavior-Driven Development is another form of ‘test-first’ approach. They both help in achieving the built in quality of the product ultimately the rate at which defects gets logged is reduced.

Development is done in a loop until the point all of the acceptance criteria is covered through test cases and each of the test cases are passed by the code written. It is as simple as :

Fig: Test Driven Development mind.
  • Dev writes the test cases first, both new or an update in the existing case;
  • It is followed with running the cases and reviewing the failures. It helps in verifying existing test cases validity and also shows which all areas will break (through regression and progression);
  • Dev follows it up with minimum code fixes needed to make the test cases pass, if it doesn’t then continue the process;
  • It builds up the confidence in development that the current changes meets the requirements and they have not created any bugs in the system;
  • Last but not the least, refactoring is very much necessary to reduce the redundancy further to ensure the changing requirement is in line to design;

Development team continually update their designs to cater to the new requirements so that the growing codebase doesn’t lead to poor code quality.

Hope you like the read. Look for the article on BDD (Behavior Driven Development) to get more insights around ‘test-first’ concept !

--

--

Basu Bishal Bhashkar
Basu Bishal Bhashkar

Written by Basu Bishal Bhashkar

Technical Program Manager, Agile Evangelist, Agile Coach, Keen observer and Problem Solver, Program Manager

No responses yet