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

I am kind of starting to doubt about the utility of unit tests. From a theoretical perspective I see the point in writing unit tests. But in practice I rarely seen them being useful. Guy A writes poor logic and sets in stone that poor logic by writing an unit test. Manual testing discovers a bug so guy B has to modify that poor logic and the unit test.

I'd rather see the need for integration tests and end to end tests. I want to test business logic not assert that 2 + 2 = 4.




I've always looked at unit tests as a targeted and often temporary measure.

Once you have a way to do a good integration/e2e test, the results of the constituent unit tests don't provide as much value.

I'd rather run one big complicated thing for real once than hang my hat on a bunch of fake green checkmarks that update every 50 milliseconds.




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: