3 ms·
I was in the same boat as you a year ago (solo developer building reviewnb.com). I wrote API tests for the backend (assert API x with y input returns z) and com
by amirathi 7y ago
I was in the same boat as you a year ago (solo developer building reviewnb.com). I wrote API tests for the backend (assert API x with y input returns z) and completely forgo any unit tests. This has given me 80% benefit with 20% effort.
I wrote these tests after launching the product publicly and just before support requests / bug fixing period started with the simple aim of avoiding regressions as I work through the improvements.
If I were to give general suggestions on the topic,
- In most cases having high level sanity tests is low effort high value decision.
- To write tests or not shouldn't be a binary decision. E.g. If you think a specific aspect is going to need refinement work then tests for those modules can help you immensely.
- Going for high % coverage very early on for the sake of mental satisfaction or bragging rights is usually not a good time investment
My only regret is not having any automated tests for frontend. Investing in some basic selenium tests after launch would have been worth it.