I’ve just finished reading “Test-Driven Development: By Example” written by Kent Beck. It’s a second time when I read this book, a few years ago on the Kindle, today as a paper-book.
If you need the recommendation to read it, you have mine. I could say that book is perfect for:
- entry-level developers,
- highly experienced developers who are afraid to write tests.
I’m sharing with you my notes, which I wrote during reading.
TDD is a recipe
1) Write a test
2) Write an implementation
3) Refactor the code
Hint: never mix writing implementation and refactoring in one step.
Hint: start with a simple test for simple functionalities.
Finish your day with not passing tests
Tomorrow, you will know where and how to start.
Warning: it doesn’t apply if you are not working alone on the branch.
Small steps are not needed
Even if the book presents all changes as really atomic units, it doesn’t mean you have to follow it. It explains that you should be able to make small steps, even if you don’t need them right now.
TDD is a philosophy
You can apply it for E2E tests, integrations, database testing, and so on.
Scrum is about a fast feedback loop
TDD is as well. Conclusion? You are not able to make the Scrum if you don’t do TDD.