Test-driven development

Test-driven development (TDD) is part of agile philosophy, and it appears to solve the common developer's problem that shows when an application is evolving and growing and the code is getting sick. The developers fix the problems to make it run but every single line that we add can be a new bug and it can even break other functions.

TDD is a learning technique that helps the developer to learn about the domain problem of the application they will build, doing it in an iterative, incremental, and constructivist way:

  • Iterative because the technique always repeats the same process to get a value
  • Incremental because for each iteration, we have more unit tests to be used
  • Constructivist because it is possible to test everything ...

Get PHP Microservices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.