An Interest In:
Web News this Week
- April 16, 2024
- April 15, 2024
- April 14, 2024
- April 13, 2024
- April 12, 2024
- April 11, 2024
- April 10, 2024
Strategies for Testing IE on Different Platforms
You might believe that web developers who use Windows as their primary OS have it easy, when testing Internet Explorer; simply click on the blue “E” and go to town. That might be true if they only had to worry about the version of IE on their PC, but we all know that’s not the case. Depending on your project’s needs, you may need to ensure compatibility from IE6 through IE10, which certainly poses some challenges. How do we deal with this?
Now if you’re on Windows, you definitely have a leg up because at the very least, you can natively test a specific version of IE, but it’s a whole different ballgame if you’re on a Mac or Linux box.
What I want to do is explore the various ways of testing Internet Explorer across popular platforms, and offer suggestions on how to lower the friction of testing for multiple versions of the browser.
Versions, Versions, Versions…
We all know testing is hard.
Internet Explorer has multiple versions in use, each with their own level of quirks and feature support. While it’d be great if we only had to target IE10, in reality a lot of users and companies simply haven’t upgraded their browsers or operating systems. This means that depending on what you’re building, your test matrix may have to include up to five different versions of IE. I can hear the groans now.
Thankfully, IE9 and IE10 have strong support for standards, and IE6 is starting to go the way of the Dodo bird (albeit slowly). In fact, many top sites have completely dropped support for IE6 and IE7–a great step forward, especially compared to where we were just two years ago. And with Microsoft publically saying that IE10 will come to Windows 7, my hope is that IE10+ will help minimize the number of supported versions in the near future.
With that said, these versions still pose a testing dilemma because you can’t run multiple versions of Internet Explorer on the same PC. This means that we need to look at alternative solutions such as:
- Virtual machines
- Virtualized browser sessions
I’m going to touch on each one of these and discuss possible solutions.
My First Goto Tool for Testing
When I need to test a site in Internet Explorer, my very first tool is the F12 Developer Tools in IE10. Built into the toolset is the capability to switch both the browser and document modes to emulate IE7 through IE10.
It basically gives me comprehensive test coverage for the most commonly used versions of Internet Explorer within a single browser. It becomes a simple matter of picking my browser mode so I can work with specific feature support and then choosing the rendering mode for my page.
The reason I say that this is my first line of testing is because it helps me find many common issues. It’s a great tool for identifying and interactively testing problems such as missing vendor prefixes or if a page is rendering in quirks instead of standards. And I will say that having used this extensively, it’s helped me resolve a number of site issues without the need for loading a virtual machine or using another PC.
To be clear, though, it is definitely not a replacement to testing in an actual version of Internet Explorer.
The IE engineering team does its best to backport functionality, but doing so is a fairly massive effort and not always foolproof. To have the most reliable testing experience, you’ll need to either have multiple PCs (physical or virtual) running different versions of Windows/IE. Unless you’ve got money burning a hole in your pocket, I’m thinking the VM route is probably the best choice.
Virtual Machines
I really like using virtual machines because it gives me the opportunity to test not only browsers, but different OSes from within my own PC. As much as I’d like to have a ton of devices to test and play with, I think my wife might not be happy once the electric bill comes in. I’ve had VMs at some point for every major version of Windows and Ubuntu. It’d be great to be able to run OSX, but my understanding is that there are technical and licensing issues with doing that.
There are two ways of getting Windows into a VM for testing. The first is to buy a license for each version of Windows you’ll test. I actually have licensed copies of Windows XP, Windows 7 and Windows 8 which I bought for my own personal testing. The long-term cost was small, and I considered it an investment as a professional web developer. This allows me to install the OS and activate it without having to worry about Microsoft’s infamous time-bomb. I can get all of the updates, and it basically gives me a real working version of Windows.
I know not everyone thinks the same way, and not all of you will want to make the investment.
For those of you on the more frugal side, Microsoft offers the Internet Explorer Application Compatibility VPC Images that provides a preinstalled version of Windows with a specific browser version. These images allow you to work with Internet Explorer versions 6 through 9 nearly indefinitely but with a big limitation. The following sums it up:
My very first tool is the F12 Developer Tools in IE10.
You can activate up to two “rearms” (type slmgr -rearm at the command prompt) which extends the trial for another 30 days each time, or simply shutdown the VPC image and discard the changes you’ve made from undo disks to reset the image back to its initial state. By using either of these methods, you can technically have a base image that never expires, although you will never be able to permanently save any changes for longer than 90 days.
So you should be able to use any of the VPC images indefinitely, but after 90 days, any configuration settings you’ve saved in the image will be erased. I look at this as a small price to pay for having a free image to use for testing. I know that when I’ve used them, I explicitly did so to test IE so I had minimal, if any, configuration changes lost. The only image that behaves differently is the WinXP/IE6 image; it shutdowns completely on a specific date. As of this writing, that would be February 14, 2013 so be sure not to give that as a gift to your special person for Valentine’s Day.
If you’re using Windows 7, you’ll need to grab a copy of Virtual PC, which lets you create VMs and run existing VHDs. Windows 8 Pro includes the Hyper-V virtual machine manager. It’s not turned on by default, so you’ll need to go into “Control Panel->Programs->Turn Windows features on or off” to enable it: