1. Automated unit tests AND behavior driven tests (outside-in testing)
2. Having the code checked by another developer by doing a code review or pair programming
3. Week of hardening where the code is tested by the project manager/business analyst/QA person
I really think that helps to cover all bases. Clients sometimes think it's overkill but it's much easier to fix a bug the earlier it's caught.