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

This is exactly why I've always been skeptical of extensive unit testing. Certainly you want some but the bugs almost always seem to crop up at the integration points. I always try to focus my tests on as much of the stack as I can reasonably address.

Of course, doing whole-stack testing in a meaningful way at Facebook's scale is a very tricky thing.




Unit testing does not preclude integration testing, they complement each other excellently.


It's not an either-or thing, I agree, but I see so much emphasis placed on unit testing lately, often at the expense of integration testing, particularly in the ruby world where people mock and stub so much of the code that you're testing something very far removed from the real runtime.


I don't think a lot of devs (perhaps especially the TDD faithful) appreciate how clumsy, immature, and downright primitive modern testing and mocking tools are. Even the best mocking frameworks give you nearly free reign to make up any behavior for mocked objects, many devs don't appreciate the importance of the gap between mocked behavior and actual behavior.

Which makes integration testing all the more critical.




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

Search: