- Unit test = lowest, granular level.
- Functional test = middling, modular level.
- Integration test = higher application level.
- Factory Acceptance Test = see it all work
- Site Acceptance Test = see it all fail :)
All the above are useful but they're not mutually exclusive. You should be doing most of them but the amount of time you spend on each part depends on the results you get from them, that's all. If your code is too modular to be easily unit tested, then spend your efforts on the functional tests. If you're writing a library of small components, spend your time on unit testing them, and if you're writing control systems for military missiles you should definitely be site acceptance testing them (as explosions even when it fails is fun :) )