Hacker News new | past | comments | ask | show | jobs | submit login

I personally use mocks or stubs only in unit tests. Everything else should be live test or recorded network responses but always run through live code. Unless the service really depends on it, I do not reccommend setting up local swarm of services. This breaks down if you shift to distributed micro services and has little benefit for a single service app (ex crud + database app, no reason to test the database in the app tests).



Persisting data for your test paths is much easier with a database though.


Yes full QA and Prod environments should provide coverage for most cases in which you would not need to setup a database on each test run.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: