TheZ mentions virtual machines. Lots of hoops to jump with licensing.
My personal "path of least resistance" was to use the old PPC Mac Mini and almost like the old Intel. PPC launches 10.4 to test an old application; Intel mini loads various OS versions with which to test. All installation images are one-time and can be recovered from a network volume for a clean environment no matter what I do with it.
If you are not interested in PPC, then just use Intel Mac Mini, divide it into older versions of the OS and use it exclusively as a test environment.
source share