Comment by troupo
2 hours ago
> for documentation purposes, integration tests are an order of magnitude more useful.
Not just documentation purposes. In almost all cases integration is better than unit tests: they cover the same code paths, they actually test observed behaviour of the app, etc.
Notable exceptions: complex calculations, library functions.
> I've found integration tests to be far more useful than unit tests. I've had experiences where I'd do a project and have really high unit test coverage, only to unveil fairly trivial bugs. The reverse hasn't happened - if I start a project with solid integration tests, I almost never encounter trivial bugs.
If I could upvote this several times, I would :)
No comments yet
Contribute on Hacker News ↗