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
Axel Fontaine is the founder and CEO of Boxfuse the easiest way to deploy JVM and Node.js applications to AWS.
Axel is also the creator and project lead of Flyway, the open-source tool that makes database migration easy.
He is a Continuous Delivery and Immutable Infrastructure expert, a Java Champion, a JavaOne Rockstar and a regular speaker at many large international conferences including JavaOne, Devoxx, Jfokus, JavaZone, QCon, JAX, ...
You can follow him on Twitter at @axelfontaine
Two day intensive on-site training with Axel Fontaine
Upcoming dates
Iasi, Romania (May 10-11, 2017)
Oslo, Norway (Oct 16-17, 2017)