Yeah, I get that. But it makes me wonder why "unit testing" became such a hot thing. I think it's just because it's simpler than integration testing. But integration testing is much more valuable.
True, it's much simpler. It's also much more interesting when you start having a huge codebase, and you want to refactor/add a feature/fix a bug, because you don't need to set and verify the whole input/output of your application but only the one that does the logic you're interested in.
It's also simpler to use unit tests for verifying all possible inputs and outputs of a component.
But, as others have said, unit tests alone are necessary but not sufficient.
> But it makes me wonder why "unit testing" became such a hot thing. I think it's just because it's simpler than integration testing. But integration testing is much more valuable.
TDD focuses on a particular method of leveraging unit testing to improve code quality and avoid bloat, but it doesn't suggest that integration testing should be abandoned. Integration testing is just outside of the scope of the part of the dev process TDD is focussed on improving.
Unit testing has the benefit of telling you more specifically which bit of code is broken. That is more valuable when it finds the error. Integration testing will find more errors. As dragonwriter says, though, the focus of TDD is not the fact the tests find errors but the way they shape your development. For that end, it's not clear to me (at all) which is "more valuable".