Why Windows 7 Will Revolutionize Your Browser Testing

Windows 7I’m sure there are developers who love nothing more than testing their carefully-crafted application in 57 varieties of web browser. The long winter nights must fly by. For the rest of us, browser testing is a necessary evil made even more painful by Internet Explorer. Thanks to a Microsoft decision made at the dawn of civilization, IE is tightly integrated into the OS so it’s not possible to run multiple versions on the same machine. Unfortunately, IE’s market share is evenly distributed between IE6, IE7 and IE8.

There are a number of solutions for IE testers:

  • IE8 can switch to IE7 compatibility mode (although there is no IE6 mode)
  • use “hacked” standalone versions of IE, or
  • install IE-testing applications such as IE Tester.

These solutions are useful but flawed. Browsers can fail in certain Windows versions, conflict with each other, use the wrong JavaScript engine, or fail to apply PNG and filter effects correctly. The most reliable testing method is to use multiple PCs or virtual machine software such as the excellent VirtualBox.

Windows Virtual PC

Virtual PC is Microsoft’s competitor to VMware and VirtualBox. The 2007 version was adequate but it did not offer the speed or facilities available in other packages.

The new Windows 7-only update is now available as a release candidate, although it’s probably best to wait a few weeks for the final version. The software has been overhauled and utilizes processor virtualization — a technology that is available on most modern chips, but may need to be enabled in your BIOS.

Windows Virtual PC can be installed on any edition of Windows 7 including Home Basic and Home Premium, although you should probably have at least 2GB of RAM.

Windows XP Mode

XP Mode is a single, licensed, stripped-down virtual copy of Windows XP SP3 that is available for free to Windows 7 Professional, Enterprise and Ultimate users (not Windows Home).

XP Mode allows you to install applications on your virtual machine but run them under Windows 7 as if they were native applications. They can access local drives, save to the host’s “Documents” folder, or have an icon on the desktop. Only the slower start-up indicates that you’re using a virtual XP application.

Running Multiple IEs

XP Mode will slash browser testing time because it will finally be possible to run true versions of IE6, IE7 and IE8 on the same desktop at the same time.

To run IE6, you need to launch the XP virtual machine and, within the guest OS, create a shortcut to the browser in the “All Users” desktop or start menu folders. That shortcut will be duplicated in the Windows 7 start menu.

It’s not possible to install IE7 within the same virtual machine because it will remove IE6. However, you can create a new instance of the virtual OS by copying/cloning the hard disk image, installing IE7, and adding a shortcut as before.

Note: we’ll provide step-by-step instructions on SitePoint when the final version becomes available.

Buyers Beware!

If you plan to use XP Mode, ensure you purchase the correct of Windows 7 — only Professional, Ultimate and Enterprise are supported. Virtual PC will run on Windows 7 Home Basic/Premium, but you need to install your own licensed guest OS and will be unable to take advantage of XP Mode features.

Windows 7 will be released on 22 October. Pre-order offers may still be available so be wary of pricing assumptions! Prices at the US and Canadian Amazon stores are logical, e.g.

but, the EU browser ballot bemusement continues to cause weird pricing in the UK. Windows 7 upgrades now cost more than the full versions?…

The French and German Amazon shops appear to be selling the full version (still marked as “E”) at a similar price to the US. European buyers could benefit from buying in the UK.

Will XP Mode change your browser testing practises for the better? Or is Microsoft fixing something that should never have been a problem in the first place?

Related reading:

Win an Annual Membership to Learnable,

SitePoint's Learning Platform

  • Adii

    Virtual Box support window 7 64bit or not??

  • http://www.primalskill.com feketegy

    Although you can make IE8 switch to IE7 compatibility mode, it’s very buggy and I don’t rely on it anymore.

    I had a couple of times when I tested a website that it looked different in IE7 native and IE8 IE7 compatibility.
    The best bet is to rely on the native engines and not the compatibility modes…

  • http://www.optimalworks.net/ Craig Buckler

    @feketegy
    I totally agree. Even MS accept that IE7 compatibility mode isn’t perfect.

    I’ve tried many solutions but most of the testing apps and hacks are quirky or fail miserably in Vista. Running IE natively on an XP VM is the only reliable choice, and Windows 7 will finally make that easier.

  • fineartdavid

    I had a couple of times when I tested a website that it looked different in IE7 native and IE8 IE7 compatibility.

    But that’s part of the fun! Two new browsers to test instead of one.

  • Anonymous

    Try spoon in firefox :
    http://spoon.net/browsers/

  • simonbanyard

    European buyers could benefit from buying in the UK.

    That’ll be a first!

  • nachenko

    Interesting article, but I prefer using Xenocode’s Spoon plugin for Firefox to test all browsers available. It’s an amazing app.

    Sidenote: Testing browsers suck so much, I’m starting to charge for IE6, Safari and Opera support, I only test on IE7, FF3 and Chrome by default.

  • madr

    It makes my frustrated to read that they require Proffessional/Ultimate to get this feature. As a Mac user, I use virtual machines to test my stuff, and to be billed that amount of cash just to test for real without hacks is not helping.

    I would appreciate a “Windows 7 Developer Virtual edition” in a OEM-like manner but for installing in virtual machines only, limiting the number of times it could be copied or moved.

    This edition is slimmed from unrelevant features of the OS and comes with Window virtual machine.

    I would gladly pay $100 or £90 for this edition, as it contains exactly what I need and truly would ease my pain.

    I again feel that Microsoft are too expensive to give me any real help.

  • http://www.optimalworks.net/ Craig Buckler

    @nachenko

    Xenocode is very good, but I’ve still experienced odd issues with IE filters that don’t occur in the ‘real’ browsers.

    Best of luck charging for IE6, Safari and Opera support. In my experience, clients just expect it to work — they don’t know or care what browser they or their customers are using. Safari and Chrome are usually similar (they’re both Webkit-based). Opera is generally easy too.

  • http://logicearth.wordpress.com logic_earth

    Just to point out, XP Mode is not limited to the higher SKU editions of Windows 7. Only the free licensed copy of Windows XP is given to the higher SKUs. If you have your own valid copy of Windowx XP, or even Windows Vista, or Windows 7 itself you can install it in Virtual PC and use the integration addon (known as XP Mode).

  • Chris Pratt

    So, the idea is that Windows 7 is going to revolutionize browser testing because it has a (still beta) virtual machine included? That’s hardly revolutionary. I think I’ll just stick with VirtualBox and keep my $120+ to do something more worthwhile with, like… umm… folding paper airplanes.

  • josebb

    Will the free currently available IE images for Virtual PC and Virtual PC itself still be available for free for Windows 7 Home Basic and Premium users?

    If not, I don’t see how this is revolutionising browser testing. It is just charging developers for something that was previously free.

  • http://twitter.com/chrisbloom7 xangelusx

    @nachenko – I really like that idea. I’ve always maintained that I support the current and previous versions of all major browsers. In IE’s case, that means 7 – 8. IE6, though still prevalent (no thanks to proprietary business apps using non-standard HTML), is well-known as flawed and insecure, and does require an ENORMOUS effort to test and design/code for.

    I haven’t heard of Spoon, but will check it out.

  • http://twitter.com/chrisbloom7 xangelusx

    @nachenko – I really like the idea of charging for obscure/outdated browsers. I’ve always maintained that I support the current and previous versions of all major browsers. In IE’s case, that means 7 – 8. IE6, though still prevalent (no thanks to proprietary business apps using non-standard HTML), is well-known as flawed and insecure, and does require an enormous effort to test and design/code for.

    I haven’t heard of Spoon, but will check it out.

  • http://www.optimalworks.net/ Craig Buckler

    @Chris Pratt & josebb
    The revolutionary aspect is that Virtual PC allows you to run IE6 (or any other XP program) as if it’s a Windows 7 application. There’s no need to start a VM and, once it’s configured, it’s as fast as any other native application.

    I currently use VirtualBox and it’s great — but booting two or more virtual machines to test IE6 and IE7 is a chore.

    Virtual PC will remain free for Windows Home users, but the free IE images expired in 2008 (does anyone know any different?) If you use Windows 7 Pro/Ultimate, you’ll be given a virtual XP licence (there’s no need to buy XP) and can run XP Mode.

    XP Mode is the only reason I purchased Windows 7 Pro myself!

  • W2ttsy

    @Craig – “The revolutionary aspect is that Virtual PC allows you to run IE6 (or any other XP program) as if it’s a Windows 7 application. There’s no need to start a VM and, once it’s configured, it’s as fast as any other native application.”

    This sounds a lot like the unity function in VMfusion. So nothing revolutionary about it all.

    I use my mac to do all my testing. I run 3x VMs with an install of IE6 (default XP install), then XP SP2 with IE7 and then XP SP3 with IE8. I also have FF 3 and FF3.5 running on two of the VMs and opera 10 and safari 4. Gets me pretty good coverage.

  • http://www.optimalworks.net/ Craig Buckler

    @W2ttsy
    I’m not sure about VMfusion, but it looks a little like seamless mode in VirtualBox, i.e. the guest OS appears as if it’s a background to your main desktop. It’s very good, but it still means you need to start the VM. Also, it only works with one VM at a time — you can’t start IE6 in one VM and IE7 in another.

    XP Mode works without (noticeably) starting the VM — the app works as if it were running on the Windows 7 host without the XP taskbar or any other guest OS controls. It’ll even save files to the user’s “My Documents” by default. That means IE6 can run from one VM, IE7 from another, and IE8 on the host at the same time.

    I’m not aware of any other VM package which can do that. Even if VMfusion does, it costs $99 — which is more than the difference between Windows 7 Home and Pro and it doesn’t include an XP licence.

  • jasongraphix

    Like several of the previous commenters, I use VMWare Fusion to do my browser testing. On Amazon, this app is just $39.99 and a legit system builders copy of WinXP SP2 is currently $87.99. XP SP2 Ships with IE6 before doing any updates. Just save a snapshot in VMWare with IE6 installed, do a software update to get IE7 and take another snapshot, then install IE8 and take a third snapshot. Switching between snapshots in VMWare takes a minute or so but this sounds just as efficient as the VirtualPC method at a fraction of the cost. You can sleep easy at night knowing you’ve tested your designs in the native versions of each browser or use a combination of standalone apps to make life easier…but I definitely will not be upgrading my VM to Windows 7. Thanks, but no thanks M$. :)

  • http://m2i3.com myrdhrin

    @jasongraphix

    I would be very careful with using snapshots with VMWare… from the front end they do what you want, thye allow you to switch quickly… but in the back end it is another story, since they are using a journal to record what’s happening in your virtual environment. If you leave you VM running for a long time without reverting to the snapshot you can eat up a lot of disk space for nothing (at work I’ve seen machine grow so big we could not manage them anymore). Snapshots are cool but fun long running machines, clones are better.

    Jean-Marc
    http://m2i3.com

  • Gigi

    just use

    http://spoon.net/browsers/

    instead of worrying about virutal PCs

    Gigi
    http://www.phpmycoder.com

  • Balaji_Getfriday

    Wow, I hadn’t thought about it that way before. Good write up, very clearly written. Have you written previously about Windows 7? I’d love to read more.

  • preview

    What about this superpreview for IE powertoy that MS has? Believe it can do IE 6, 7, 8 web page comparisons and is a free download. Does FF too, but you have to get their Web dev tool…is it any good?

  • http://www.optimalworks.net/ Craig Buckler

    @preview
    SuperPreview (reviewed here) is excellent, but it’s more of a design testing tool. It loads a static snapshot of a page in various browsers so you can compare rendering differences. Links and JavaScript functionality won’t work.

    You should also note that SP’s IE7 view uses compatibility mode if IE8 is installed. It’s OK most of the time, but not always.

  • Justice

    thanks Gigi

  • Julie

    Hi Craig,
    Good to know Win 7 is going to be so useful. You might be interested though that I’ve been running stand-alone versions of IE all the way back to version 4 for some years now, yes all on the same desktop (Win XP).
    Got the idea from Rachael Andrew (many thanks Rachael!) from her book “CSS Anthology: 101 Essential Tips, Tricks and Hacks”. One of the best sources I’ve found is at: http://www.oldapps.com/old_version_list_web_browser.php
    You’ll find all the browsers you could dream of there, in all their many dif versions,
    happy testing!

  • http://www.optimalworks.net/ Craig Buckler

    Hi Julie.

    I used to do much the same but my XP laptop died so I had to upgrade to Vista. Unfortunately, none of the hacked solutions work well on Vista so it’s necessary to use a VM. Windows 7 will save me loads of time!

  • Julie

    That sure is a shame Craig, I’m rather surprised as I always understood that Vista wasn’t that much different to XP, maybe Microsoft decided to plug the hole along the way.
    For anyone else reading, the standalone browsers should work for all earlier versions of Windows as well, I used to run them on Windows 98 no problem. Look’s like yet another reason not to upgrade from XP!
    best wishes, Julie

  • http://lantner.net/david/ davidlantner

    Great article, Craig. While launching a Virtual PC VM may be slow, I rely on it (on my Windows XP computer) to run Internet Explorer Application Compatibility VPC Images provided by Microsoft. These are free, licensed versions of Windows XP and Vista loaded with your choice of IE 6, 7, and 8 specifically for testing and developing with IE. I posted an article with full details and instructions over at ClearType Press and welcome your feedback:

    http://cleartypemedia.com/press/2009/10/test-strategy-for-ie6-ie7-ie8/