Testing Multiple Versions of Internet Explorer Using Virtual PC

Did you know that there’s a free way to have multiple versions of Internet Explorer running natively on a single PC? Well now you do! Here’s how to get it and why you should care…

Why Bother at All?

Every time I make change to to the design of our gardening website I need to check that I haven’t broken anything. In an ideal world I’d test the site on all combinations of browser and OS; realistically IE and Firefox covers 99% of our visitors so that is what I focus on. Testing with IE (specifically IE6) is a very unpleasant, but unavoidable part of web design.

How to Test Multiple Versions of IE?

Since it can’t be avoided, the main ways Web Designers have to test the various versions of Internet Explorer are:

  1. Use the standalone versions (a good option)
  2. Use the free Virtual PC images from MS to run different OS’s and browsers on one PC (what I’m doing)
  3. Buy lots of hardware and Windows licences (which I have no intention of doing)

Why Not Use Standalone Internet Explorer?

Using the standalone versions of internet explorer has worked well for me in the past but conditional comments need a registry edit to work properly and some other stuff doesn’t work at all. It’s all explained on the site and whoever created the standalones did a great job. There are still a couple of reasons I’d prefer to use the MS provided Virtual PC images.

  1. Bearing in mind how rubbish IE is generally, I’m not filled with confidence that hacked standalone versions will behave in the same way they do when installed ‘cleanly’ as MS intended.
  2. I use WATIR to automate a quick visit to each page and check there are no horrendous rendering errors; running a WATIR script automatically opens, and tests with, the ‘installed’ version of IE. This means if you have IE7 installed properly and IE6 installed as the standalone version, you can’t run WATIR tests on IE6 (well, I don’t know how – suggestions welcome).

Testing Multiple Versions of IE on a Single PC (For Free)

Although Virtual PC itself is free, normally you need to buy extra Windows license for each Virtual Machine. Fortunately Microsoft provide free images that allow the likes of you and me to test different versions of Internet Explorer. The catch is that the images expire after a few months – as a guide, the ones I downloaded today (20th Jan ’09) have been out since Dec ’08 and are good until the end of April ’09.

Installing Virtual PC and Images

Once you download Virtual PC (for free), installation is an absolute doddle; just run setup.exe and keep clicking ‘next’.

The same goes for downloading and extracting the IE VPC images; aside from choosing a directory for them there’s nothing to it.

Starting a VPC Image

To get started running one of the disk images, start up Microsoft Virtual PC (Start > All Program > Microsoft Virtual PC). There’ll be no virtual machines by default so click on ‘New…’ to set one up…

There’s a bunch of screen shots at the bottom of this post that show the process, but basically you want to create a new Virtual PC, choose a name, OS, RAM and then select to use ‘An existing virtual hard disk’ (the image you downloaded earlier from Microsoft).

That’s it! If you go to the Virtual PC Console, select the Virtual Machine you just set up and click on ‘Start’ You will have another version of Windows start up as if it’s an app running on your physical machine – cool huh?

Networking

I had one small issue with networking which was easily resolved from the VPC console. My physical PC has two network cards with only one actually connected. The virtual PC’s I set up all opted to use the disconnected one by default. If your VM doesn’t have connectivity go to the VPC console, select the VM you’re having issues with and click on ‘settings’. Double click on ‘Networking’ and choose the port your VM should use.

Notes…

I installed VPC 2007, SP1 which according to the site runs on: Windows XP Professional, Windows XP Tablet PC, Windows Server 2003, Windows Vista Business, Windows Vista Enterprise, and Windows Vista Ultimate.

Screenshots of setting up a Virtual PC

Select "New..." to create a new Virtual Machine

Select "New..." to create a new Virtual PC

Choose "Create a Virtual Machine"

Choose "Create a Virtual PC"

Choose a sensible name for your VM

Choose a sensible name for your VPC

Choose the correct operating system (the free ones are XP)

Choose the correct operating system (the free ones are XP)

I accepted the default 128MB RAM

I accepted the default 128MB RAM

Select 'Existing Virtual Hard Disk'

Select 'Existing virtual Hard Disk'

Choose the .VHD file downloaded earlier

Choose the .VHD file downloaded earlier

Just click 'Finish' and you're hot to trot

Just click 'Finish' and you're hot to trot

Your new Virtual Machine is displayed in your VPC console.

Your new Virtual PC is displayed in your VPC console.

Advertisements

About this entry