IE testing the easy way
Arguably the worst part about web development is having to deal with old crappy IE versions. I’ve always struggled to find a good way to test my sites on Windows and in different browsers, but now I finally have a setup that I’m really happy with.
I need to be able to test IE versions 7 through 10 as well as recent Firefox and Chrome versions on Windows. Microsoft has made VMs available for this purpose for a while, but they used to be pretty hard to get to work properly. Not anymore. Lots of different images for eg. VirtualBox can be downloaded from modern.ie.
But there is no reason to create a different VM for each browser version. Instead you can start with the earliest IE version you want1, then use snapshots to build a suite of test browser installations.
The principle is really simple. After downloading and unpacking the “IE8 - Win7” VM, I made an initial snapshot. Then I tweaked a few things to my liking (screen resolution, VirtualBox guest additions etc.) and saved the “IE8” snapshot.
Next I simply installed IE9 and took a snapshot. Then reverted to IE 8, installed IE 10, took another snapshot, did the same for Chrome and FF.
All snapshots are taken in the exact state where the browser is ready for testing. This is important - do not snapshot a powered down VM for example, because there is no reason to wait for it to boot when you need it. The snapshots in my VM take only a few seconds to load and the browser is instantly ready in each one.
If you make a mistake or change your mind about the way one of the snapshots is set up, it is easily fixed. Just load the snapshot, make your adjustments and take another snapshot. For example, let’s say I wanted to lower the resolution in my Chrome snapshot:
If you want to discard the original snapshot, you can simply delete it.
This merges the patched snapshot with the original one, which can be time consuming but saves HD space. Finally you probably want to rename the patched snapshot.
You may have noticed that IE7 is missing in the list of snapshots. IE7 apparently doesn’t run on versions of Windows later than Vista (which is well known to be among the very worst Windows incarnations - Windows 7 is much more pleasant to work with). So I had to keep that one separate. ↩