sandbox for testing application
Since Lion it is possible to run a virtual copy of Mac OS X on Apple hardware (e.g., with VirualBox, Parallels, VMWare).

You could install a clean copy, take a snapshot and use this fresh installation for tests.