What is Test Driven Development

TDD Workflow

Let’s have a look at the cylce of TDD.

Advantages of TDD

  1. By writing the test cases first forces us to focus on what we want from the code.
  2. TDD creates a detailed specification.
  3. TDD reduces time spent on rework.
  4. We will spend less time in the debugger.
  5. We are able to identify the errors and problems quickly.
  6. We can easily tell if our last change broke the working code.
  7. TDD allows the design to evolve and adapt to your changing understanding of the problem.
  8. TTD helps simplification of the code. We will only write code in response to the requirements of the tests.
  9. TDD creates SOLID code.
  10. TDD supports a clean interface.
  11. TDD creates code that is maintainable, flexible, and easily extensible.
  12. The resulting unit tests are simple and act as documentation for the code. Since TDD use cases are written as tests, other programmers can view the tests as usage examples of how the code is intended to work.
  13. Development costs are cut.
  14. Quality is improved.
  15. Bugs are reduced.
  16. TDD will give us enough flexibility to integrate new functionality.

Limitations of TDD

Despite its many advantages, many developer teams find it difficult to use TDD efficently. Many of them having trouble where to start or what to do next, this may cause some developers to be too much detail-focused and losing the sense of big picture and business side of the product.

TDD In Agile

Test Driven Development is one of the common practies of Agile.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store