in reply to starting to write automated tests

The node What is the best way to add tests to existing code? focuses on what you're after, namely building tests for legacy code.

When testing legacy code, I've found both Mock Objects and Stubs to be useful weapons. You should understand the pros and cons of Mock Objects versus Stubs and when it is appropriate to employ them.