Users visiting a web site use different operating systems (Windows, Linux), and different browsers (Internet Explorer versions 6,7,8,9, Firefox, Chrome, Opera,…).
There are “cross-browser” libraries and other tactics to avoid these compatibility issues between browsers, but the first step is to discover where do these problems happen, by testing the pages in our site on a set of different types of browsers and versions that cover as much as possible the browsers used by our visitors.
In this post we will explain how to set up a testing environment in a computer running Windows 7 Professional, to run on a single computer different versions of Internet Explorer and other browsers.
1. Install Virtual PC and download a virtual Windows XP image
First, download Virtual PC from http://www.microsoft.com/windows/virtual-pc/default.aspx. (Note: The download only work for IE browsers)
Next, download the virtual machines for the different versions of IE we want to target, from the Microsoft download page: http://www.microsoft.com/en-us/download/details.aspx?id=11575. For instance, download “Windows_XP_IE6.exe”.
When this file is executed, it prompts for the location to save the virtual machine. If we answer “C:VirtualPC”, the files created under this directory are as follows:
Volume in drive C is OS
Volume Serial Number is 7288-1415
Directory of C:VirtualPC
10/10/2012 13:54 <DIR> .
10/10/2012 13:54 <DIR> ..
17/07/2012 14:13 567 IE_VPC_ReadMe.txt
17/07/2012 18:15 1,359,548,928 Windows XP.vhd
17/07/2012 18:18 14,266 Windows XP.vmc
3 File(s) 1,359,563,761 bytes
2 Dir(s) 58,213,576,704 bytes free
Then, run Virtual PC ( “Start -> Windows Virtual PC”), and select the file “Windows XP.vmc”
In the login dialog displayed, enter user “Administrator” and password “Password1”:
Afetr login, a Windows XP guest system starts executing inside the virtual machine:
2. Configure the network adapter of the virtual machine
The next step is configuring a network adapter to give connectivity to the virtual machine. In the upper menu, select “Tools -> Settings”, and in the dialog window displayed, select “Networking”, and assign the option “Shared Networking (NAT)” to Adapter 1:
With the network adapter in place, we can execute an Internet Explorer 6 browser inside the guest Windows XP system, and point it to the url of our site to test it!