This post goes to all those devs that have heard about TDD methodology but have not tried it yet. We will follow the RED – GREEN – REFACTOR cycle to build a really small API to save users to a database that will help you get started with this methodology. If you don’t know what TDD is about, I reccommend the following articles:
- In Spanish: https://medium.com/nursoft/implementar-tdd-facilmente-4d2cffaa9172
If you get lost during the process, you can find the source code for this API in https://github.com/gregodadone/tdd-example-api
I strongly suggest you do not copy-paste my code, and write it by yourself, so you see how the IDE behaves as errors come up and feel the whole experience of doing TDD. Let’s start!