I am a one person startup. Should I bother with tests?
I have many things to keep track of. I don’t want to add the code decisions to the list. I let my tests do that for me. It does seem time consuming in the beginning when I don’t have a lot of code. But it actually saves me time. A lot of it.
1. Fix bad decisions
There have been several occassions when I made some early bad code decisions. Hey, I am just one person. I can’t wait for the perfect plan before I begin to code. But I can fix my code. Tests tell me exactly what I broke. I don’t need to test everything manually after every change. I don’t have to hunt down every bug. Tests give me the courage to make such changes and not live with wrong decisions.
2. Keep your sanity
When I did not have any tests, I needed to remember all the things that could be broken because of my code changes. The more code I wrote, the more I had to remember to test. Now if I find a bug, I write a test to reproduce it and then fix the code. Then I forget about it knowing that this will not happen again.
3. Reduce customer support
My tests catch most of the bugs I would have introduced — so my customers don’t have to. That also means less time answering customer support tickets — an extremely time consuming task for a small startup.
4. Grow the company, but not the number of people
Since a good product is not a single feature, it will get complex. Tests allow me to add complexity. Once a feature is done, the tests will make sure that it always works. I can then go build some other part of the product. Improving the product in such small steps can take me very far without needing to add another engineer to the team.
Do you follow Test Driven Development for your startup?