Integration Tests

When you have to choose between writing unit tests and integration tests (sidenote: By integration tests I mean tests which treat your whole program as a black box.) – choose the latter. You’ll end up with tests which are much closer to the real data with which your program deals and when you get bug reports from users, you’re more likely to reproduce them with your existing testing routine.