2009-11-04
Browser testing on steroids: Running IE 6, 7 and 8 simultaneously on Windows 7
I use Windows 7 on my development machine. It works great, and I've especially come to like the deep integration features provided by Windows Virtual PC, as I'll show you in this blog post. They have been a tremendous time-saver when it comes to testing Veturanto, the website I am currently working on. I usually test the website using Firefox 3.5, Chrome 3, IE 6, IE7 and IE8.Firefox, Chrome and IE8 all run natively on Windows 7, no problem there. But what about IE6 and IE7? These guys only run on XP (IE 6 & 7) and Vista (IE 7). Are we out of luck? Not quite. First we have virtualization to the rescue and second we don't even need our own licenses as Microsoft freely provides VHDs of both these browsers both on XP SP3 and Vista to run tests on. (Note that they do expire every few months, but Microsoft always provides new ones in time.)
This post shows how to use them most effectively to deeply integrate IE 6 and IE 7 into Windows 7.
So let's get to work!
For this to work we will need the following things:
- Windows 7 with Windows Virtual PC installed. It is a free optional component of Windows 7. (On the download page, select Ultimate to reveal the download buttons. If you have Windows 7 Home Premium you can still use Virtual PC, but not XP Mode)
- The XP SP3 IE6 and XP SP3 IE7 application compatibility VHDs, extracted in your Virtual Machines folder.
- A Windows XP Installation CD in your CD drive (this will be needed for the Integration Components installation)
Now that we have all that ready, let's get started. The following steps describe the IE 6 installation, simply repeat them with the other VHD to install IE 7.
1. Select the IE6 on XP SP3.vhd file and click Create virtual machine to create a new VM
2. For simplicity's sake, name it to match the VHD
4. Associate the VHD with the VM and click Create
7. By default a user IETest with Administrator privileges gets created. Assign it a password (Start -> Control Panel -> User Accounts -> IETest -> Create a password) Pick IETest again to keep it simple.
8. Update the integration components, and let the installer reboot the VM when it needs to.
9. Make sure that at the end of the installation, the checkbox "Download updates required for running virtual applications from your PC" is checked before clicking Finish.
12. When prompted for credentials, click "Use another account" and enter IETest/IETest and don't forget to tick the checkbox
13. Right click Start and select "Open all users", go into Programs and drag the IE icon from the desktop into this folder.
15. Repeat for IE 7 :-)
16. (optional) Pin the icons to the taskbar next to the IE 8 icon, so that they are just only click away.
And finally there you have it, IE 6, IE 7 and IE 8 all running at the same time on Windows 7:
Hope you enjoyed it and that it improved your life as much as mine when it comes to testing in different browsers !
About Axel Fontaine
I'm an entrepreneur, public speaker and software development expert based in Munich.
I'm the creator of Sprinters. Sprinters lets you run your GitHub Actions jobs 10x cheaper on your own AWS account with secure, ephemeral, high-performance, low-cost runners within the privacy of your own VPC.
I also created CloudCaptain, previously known as Boxfuse. CloudCaptain is a cloud deployment platform enabling small and medium size companies to focus on development, while it takes care of infrastructure and operations.
Back in 2010, I bootstrapped Flyway, and grew it into the world's most popular database migration tool. Starting late 2017, I expanded the project beyond its open-source roots into a highly profitable business, acquiring many of the world's largest companies and public institutions as customers. After two years of exponential growth, I sold the company to Redgate in 2019.
In the past I also spoke regularly at many large international conferences including JavaOne, Devoxx, Jfokus, JavaZone, JAX and more about a wide range of topics including modular monoliths, immutable infrastructure and continuous delivery. As part of this I received the JavaOne RockStar speaker award. As a recognition for my contributions to overall Java industry, Oracle awarded me the Java Champion title.
You can find me on 𝕏 as @axelfontaine and email me at axel@axelfontaine.com