TDD: just do it! 26/02/2014
This article is part of a series on Tests in general and on how to practice them:
- Introduction
- Tools overview
- Test Driven Development
- TDD: just do it!
- spec BDD
- phpspec: a quick tour
- Behavior Driven Development: story BDD
- Behat: a quick tour
- Conclusion
The first two articles didn't require special skills whereas the last one needed you to be a little bit used to tests. Well the next ones will require you to be a little bit used to Test Driven Develoment (TDD), so this article is here to make you practice them!
I really mean it: reading articles on TDD might feel good, but the only thing to do to fully grasp them is to:
- start writting tests before any production code
- then write the code to quickly make them pass (write ugly code if needed)
- finally refactor the mess, without touching the tests
In other word: just do it! The learning curve is steep, so dive into it as soon as possible.
One of the best way to learn is to pair with someone who's used to it. If you don't have someone to pair with, you can always read this Extreme Programming Episode by Robert C. Martin and Robert S. Koss.
The next article will be about the next level: Behavior Driven Development (BDD).