3 Answers
3

This is entirely possible. I use either of both of the following variants depending on what I'm trying to test:

Virtual machines

You can run OS X 10.7 and newer inside recent versions of Parallels and VMWare Fusion. You can also run the server variants of older OS X versions this way; these older server variants also work on VirtualBox, which is free for personal use.

Advantages:

Run multiple versions of OSX at the same time

Should be easier to automate (script) testing

Snapshots for easy rollback to previous OS states (e.g. different patch levels, etc.)

No need to repartition your disk

Disadvantages:

Noticeably slower than natively installed OSX.

If the software you want to test uses 3D acceleration or other non-USB hardware features, you will likely run into problems. Even USB devices may or may not work properly.

Requires lots of RAM. It's just about doable with 4GiB, but I'd recommend 6-8 or more. RAM is pretty cheap, but some Macs are limited to 4GiB or non-upgradeable.

I don't have Parallels, but when I tried it, installation was pretty straightforward. VMWare Fusion just requires the Lion Installer.app (or Mountain Lion Installer.app) from the App Store for setting up a VM. When it asks for a disk or disk image, just drag the installer .app from Finder into the assistant window.

Multi-boot

You can install additional instances of OSX on your computers, and easily switch between them, either via Startup Disk in System Preferences or by holding the Alt/Option key when you hear the boot chime.

You can either repartition your existing disk - shrink it via Disk Utility and add an extra partition during setup - or install onto an extra hard drive or SSD. This can be an external USB or Firewire drive. Some Thunderbolt drives are also bootable.

The Installer.app

It's a good thing you've already purchased Lion, as you can no longer buy it from the App Store. The easiest will be to download it on your Mac running Snow Leopard: open the App Store, ensure you're logged in with your correct Apple ID and click the "Purchased" tab. You should be able to download Lion there.

When the download is done, it'll be an App in the Applications directory. Do not run it as that would upgrade your Snow Leopard install. If going the VM route, you can use the .app directly, otherwise you'll need to extract the InstallESD.dmg from the .app bundle and "restore" it to a USB stick (min 4GB) via Disk Utility. You can then boot from this stick by holding the Alt key when you hear the chime.

I also recommend backing up the installer app, as re-downloading it from the App Store from Mountain Lion is not possible out of the box. There are work-arounds, but I wouldn't rely on them continuing to exist.

This is a great answer. That's how I'm going to do it. Actually, I discovered that option-clicking the Purchases tab did the trick (a secret shortcut?) and Lion does appear under my purchases so that I download it to my Snow Leopard OS X. Thanks a lot, buddy! :-)
–
Dr.KameleonOct 20 '12 at 17:23

The Option-click trick seems to work for some people and not for others. For some reason, Lion shows up in my ML appstore purchases even though I never option-clicked the tab. The whole situation is a bit of a mess, I don't understand why Apple no longer sell Lion, considering some macs don't support Mountain Lion. Anyway, glad you got it working in your case!
–
pmdjOct 20 '12 at 17:28

@pmjordan You can still purchase Lion if you wish, but it is only available if you telephone them directly. This article published 24th Jan. 2013 gives more details tuaw.com/2013/01/24/…
–
SimonJan 31 '13 at 15:23

(You can burn Lion/ML to DVDs, though I strongly recommend SD Cards, and the image to burn reside in "Lion.app -> Contents -> SharedSupport", and burn or restore InstallESD.dmg)

Anyway, then you can start your installing game. You can partition your Mac hard drive to multiple partitions, and then install those versions to different partitions just like how you install any version of your OS.

You can use option key during startup to boot from SD/DVD or any of the partitions.

You do however, want to check Apple docs about SD booting because not all Macs with SD Card slot supports it.