Working in IT, we have often heard the term Virtual Machines. Developers working on client machines have used VMs to do the necessary stuffs at the client machines. Virtual machines are an environment or an operating system which when installed on a workstation, simulates an actual hardware. The person using the virtual machine gets the same experience as they would have on that dedicated system. Before moving on to how to setup virtual machine in your system, let’s discuss why it is used.
Use of Virtual Machine
Apart from testing an application in multiple devices or working on a remote system, virtual machines have several other uses. Let’s discuss what are those.
- Often a developer may need to work on multiple operating system. For example, if only one workstation is available, and a person needs to work on both windows as well as Linux, Virtual machine is the best option available.
- Suppose you are having Windows 10 installed in your system. If you need to test an application that only runs on Windows XP or 7, the only choice is to use virtual machine instead of downgrading your operating system.
- A preferable way to test a complex software is by using virtual machine because if your software crashes while testing, the primary and secondary memory of your hardware remains unaffected.
- If you want to leave your laptop at home and work from other location, the only choice is to install VM at the workstation and connect your laptop from there. Remote Desktop Protocol can even allow you to access your workstation from your mobile device.
How to Install Virtual Machine
In this article we shall discuss the steps to install Virtualbox, a virtual machine interface developed by Oracle. It is free to use and one of the most popular VMs used by developers in today’s world.
- You will need an ISO file of the operating system that you are going to install on your VM.
- After launching Virtualbox, an empty welcome menu will be presented to you.
- Once you click on the New icon, you will be prompted to name the VM and select its type. You can choose Linux, BSD, IBM OS, Solaris and also Mac OS from a list of available items in the dropdown.
- In the next step you will need to allocate a physical memory size to your VM. A recommended suggestion is to go with the memory size recommended by your VM.
- You will be asked if you want to allocate a virtual drive to your VM. Once you have done that, click the Create button. You will get a menu with a list containing the hard disk file types. Select VDI, name the drive and confirm its memory size. Click on Create and the process will be completed.
- Your virtual drive now being created, its time to install the operating system. Click on the Start arrow and browse to the folder where your ISO is located.
- Select the ISO, and click on Start to begin the installation of operating system on your virtual machine.
- Installing the operating system will take some time. Once that is done, you can open it and use it just like a normal computer with a different operating system.
How to Perform Cross Browser Testing on Your Virtual Machine
For a tester who works on testing Web Applications, Virtual machine acts as a boon since it allows the user to emulate different environment for testing an application.
- If you have different versions of Windows installed in your VMs, install all the major browsers like Chrome, Firefox, IE and Microsoft Edge.
- For Linux, browser differences are not that much noticeable. All the commonly used browsers in Windows work perfectly in Linux machines.
- Challenge arrives when you have to test an application in MacOS. Web applications that run perfectly in Windows specific browsers are often observed to render incorrectly in Mac browsers like Safari. To make your website accessible for Mac users, it is important to create a virtual Mac environment in your workstation and test your web application there as well.
- Virtual Machine is available on cloud as well. It is not necessary to install it on your workstation only. Lambdatest is a great solution to cross browser testing by providing a virtual environment on cloud where you can test your application across different browsers in different operating systems.
Limitations of Virtual Machine
No matter how much reliable they are, limitations of any new technology is always persistent.
- The biggest disadvantage of virtual machine is slower speed. Based on the number of virtual machines installed in your system and memory allocated to them, often you may find certain processes executing quite slowly than expected.
- Certain hardware features are only utilizable when used in native machines. Those features should be considered while running a test on your VM.
Originally published at LambdaTest
Written by Arnab Roy Chowdhury