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

Yes, if you look at the article, specifically Anti-Pattern 3, you'll see that different types of applications require different types of tests.

If your units of work are "retrieve data for a list of IDs" and "store this data in the DB" then there probably isn't a lot of unit testing to be done. You probably have some data cleansing or validation functions that you can unit test, and probably some domain-specific data transformation that you can unit test. But most of your testing should be integration testing because the important thing is that the piece that's reading the data and the piece that's writing the data work the same way. If you only have unit tests that set themselves up and tear themselves down then you'll never find a bug where, e.g., the columns get switched around on a write.




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

Search: