I want to test the web pages I create in all the modern versions of Internet Explorer (6, 7 and 8 beta) but I work mainly on a Mac and often don't have direct access to a PC.
On an Intel based Mac you can run Windows within a virtual machine. You will need one virtual machine for each version of IE you want to test against.
The instructions below include free and legal virtualisation software and Windows disk images.
- Download some virtual machine software. The developer disk images we're going to use are will work with either VMWare Fusion or Sun Virtual Box. VMWare has more features but costs $80, Virtual Box on the other hand is more basic but is free for most users (see Virtual Box licensing FAQ for details).
- Download the IE developer disk images, which are free from Microsoft: http://www.microsoft.com/downloads/...
- Extract the disk images using cabextract which is available from MacPorts or as source code (Thanks to Clinton).
- Download Q.app from http://www.kju-app.org/ and put it in your /Applications folder (you will need it to convert the disk images into a format VMWare/Virtual Box can use)
At this point, the process depends on which VM software you're using.
Virtual Box users
Open a Terminal.app on your Mac (you can find it in /Applications/Utilities) and run the following sequence of commands, replacing input.vhd with the name of the VHD file you're starting from and output.vdi with the name you want your final disk image to have:
/Applications/Q.app/Contents/MacOS/qemu-img convert -O raw -f vpc "input.vhd" temp.bin VBoxManage convertdd temp.bin "output.vdi" rm temp.bin mv "output.vdi" ~/Library/VirtualBox/VDI/ VBoxManage modifyvdi "output.vdi" compact
- Start Virtual Box and create a new virtual machine
- Select the new VDI file you've just created as the boot hard disk
VMWare fusion users
Open a Terminal.app on your Mac (you can find it in /Applications/Utilities) and run the following commands, replacing input.vhd and output.vmdk with the name of the VHD file you're working on and the name you want your resulting disk image to have:
/Applications/Q.app/Contents/MacOS/qemu-img convert -O vmdk -f vpc "input.vhd" "output.vmdk" mv "output.vmdk" ~/Documents/Virtual\ Machines.localized/
This will probably take a while (It takes around 30 minutes per disk image on my 2.4GHz Core 2 Duo MacBook w/ 2Gb RAM).
- Start VMWare Fusion and create a new virtual machine
- In the advanced disk options select "use and existing disk" and find the VMDK file you just created
Once you've virtualized Windows on your Mac, you can also try the Mutiple IE installer to get a variety of flavors of Internet Explorer without having to create separate VM instances.
If you're just wanting to see a simple screenshot of how the page will render in various browsers, you can try the free service browsershots or there are a number of services that will automatically test your pages in multiple browsers.
Browsershots is another option if you just want to get screenshots..
If you don't have a copy of Windows that you could run in a virtual machine (VMware also isn't free), you can try IEs4Linux. It will require you configure some open source stuff on your Mac, but it is all free. You'll at least need fink, wine, and cabextract. See the link above for some specific command line directions. It's not that hard!
I've used Codeweavers Crossover product for doing this from time to time.
http://www.codeweavers.com/products/cxmac/
It's a different option to virtualisation, and gives you a little more control than some of the hosted solutions. That said, it's based on WINE, and so you can potentially get all the problems and issues that come with doing it that way. That said, for basic testing without plugins, etc, it works great.
I'm not 100% sure about support for IE8, you'd need to check that out, but it definitely gives you native support for 6 and 7.
There's a OSX distribution of IEs4 Linux called ies4osx, which has worked fine for me without any configuration.
If this is a business web site (or a serious site where it is important that it actually works on IE), then don't take the cheap route - invest in a Windows machine or two. Your customers will thank you.
Otherwise, virtualize.
Browsershots is nice, but useless if you need to test functionality rather than just overall visual rendering.
IEs4OSX and IEs4Linux have serious drawbacks. They have no real support for plugins and extensions like Flash and Silverlight. Rendering isn't precise and they're highly unstable. For testing you really need an actual version of IE running on Windows, but you don't need to have a dedicated box.
IE images on VirtualBox is really the best, and easiest way to go.
I have a screencast here if anyone's looking for a visual walk-through.
Yet another Web based alternative (although as Jeff said, not much use for testing functionality) is http://www.browsercam.com