A few months ago, I was asked to investigate a method for testing multiple web browsers inside a corporate environment where each desktop is governed by a corporate standardized image. I’m sure you know this scenario, where a testing team is required to ensure compatibility with multiple released and pre-released internet browsers. However, having multiple individual PC’s configured with multiple IE versions is costly and difficult from a corporate standards perspective.
Furthermore, the browser market is rapidly changing. The entrenchment of Microsoft Internet Explorer is slowly eroding with Firefox, Safari and newcomer Chrome taking a substantial portion of the browser market. Even operating system usage is more diversified than ever before in the Internet Age, with MacOS and Linux making significant inroads.
How might this be of benefit
Functional testing, automation and security testing should be performed against multiple browsers and environments. Every browser is designed differently, and follows its own interpretation of the “road rules”. So, not only can a web site look different, it can also behave differently too. If you only test your website on Internet Explorer 7, you could be inadvertently displaying a broken website to over 50% of your website visitors.
Furthermore, other solutions (such as using separate standalone PCs, or VMWare) incurs additional hardware and/or licensing costs. This proposal allows this testing to be performed with no additional cost.
The Internet Explorer approach involves using Microsoft Virtual PC, which is a virtual machine platform (you’ve probably heard of VMWare). Using virtual machines allows the software tester to run a second operating system on their computer as if it were just another application. In addition, Microsoft provides a method to do this with minimal effort, and zero-cost.
The Non-Internet Explorer approach simply involves installing any non-IE browsers on your local testing machine. Firefox, Chrome and Safari will all run side-by-side and multiple versions can be installed by specifying different install locations.
Introducing Microsoft Virtual PC
Originally designed to allow Apple computers to run a copy of Windows (and hence Windows applications). It has since been released freely for use on the Windows operating system. Nowadays, Microsoft Virtual PC is a very useful testing tool for ensuring cross-browser compatibility for web-applications.
Please note, that Microsoft Virtual PC is quite demanding on system memory therefore at an absolute minimum you should have at least 1Gb of system memory. However 2Gb is strongly recommended.
Microsoft Virtual PC can be downloaded from the following location: http://www.microsoft.com/windows/downloads/virtualpc/default.mspx
Internet Explorer Application Compatibility VPC Images
Normally using virtual machines requires additional Microsoft Windows licenses, in addition to the license that comes with your computer. This can be very cost-prohibitive, as providing and maintaining extra licenses for an entire test team.
Microsoft provides freely available virtual machine images for Virtual PC of popular Microsoft operating system and browser combinations. These images do not require licenses, however they do have an expiry date (normally 3-4 months). This means that when your VM image expires you will need to re-download another copy.
Despite the inconvenience, it allows you to ensure you are testing against the most pertinent operating system/browser combinations. In addition, these images are preconfigured and ready to go.
The Internet Explorer VPC Images are available at: http://www.microsoft.com/Downloads/details.aspx?FamilyID=21eabb90-958f-4b64-b5f1-73d0a413c8ef&displaylang=en
IMPORTANT: Please ensure you read and understand the license agreement that is displayed when you install the VPC image. This is a non-standard EULA, and therefore you should read it thoroughly before continuing.
Getting Started with Microsoft Virtual PC
When you start Microsoft Virtual PC for the first time, you will be presented with a Virtual PC Console. A New Virtual Machine wizard should appear (if it doesn’t, click “New…”).
Click Next, and select the second option.
Click Next, and enter the name for your virtual machine.
Complete the rest of the wizard, and click Finish. Now in the settings dialog, select Hard Disk 1 and specify the Virtual Hard Disk File as the VPC image that you previously downloaded.
In addition, also configure the amount of memory to use. At a minimum select 512Mb, however 1Gb is recommended (particularly for Windows Vista images). In addition, set Network Adapter 1 to be “Shared Networking (NAT)” (NAT means that your virtual machine will be able to access your organization’s network, but will not directly connect to it).
When you’re done, click Ok and Start your new Virtual Machine.
Up And Running! Remember that your VPC image will periodically expire every few months and you will need to redownload it.
Tips for ensuring maximum cross-browser compatibility
The following tips will help to reduce browser compatibility problems: