11. Virtual Testing

Virtual - Simulated on a Computer rather than really existing

Virtual Test Environments - Software should work on/supported by many environments. The environments can be divided by:
  1. Operating Systems - OS Types (Windows, MAC, Linux etc), BITS (32 BIT or 64 BIT) and Languages Versions (English and Foreign Languages)
  2. Different Browsers - IE, Chrome, Fire Fox etc
  3. Different Databases and Servers - Some softwares connect to databases and servers from their client machines - So separate environments for running Servers and Databases are required. 
Why Virtual Test Environments?
  1. As we can't have these many number of host machines, so we've to create virtual environments and run them on our host machines. 
  2. To run more than one Virtual Machine at the same time on a single host machine
  3. If we don't want our software (to be tested software) to affect our host machine
  4. To reduce repetitive tasks like installing, Uninstalling, Upgrading softwares or for testing on freshly installed softwares
  5. To save any important state of operating - If on any case the OS fails or OS causes problems - We can perform system restore to get the correctly working saved state
Screenshot of Virtual Machines which are running on a Host Machine:

(Click  on the image to view it bigger)

VMware Workstation Software - Our office uses VMware Workstation software to create and run the virtual machines. Get the trial version of this VMware Software from http://www.vmware.com/products/workstation/

What Next?
  • Installing the VMware Workstation Software
  • Creating Virtual Environments using VMware Workstation Software:
  •   i. Double click on the VMware shortcut icon from the Desktop   ii. VMware Workstation window asking the User to Create or Open the Virtual Machine will be displayed.  Select 'New Virtual Machine' option from the VMware Workstation Window
          iii. 'Welcome to the New Virtual Machine' Dialog will be displayed [Select 'Typical' radio option and click on 'Next' Button]     iv. 'Guest Operation System Installation' Dialog will be displayed [Select 'Installer Disk Image File (ISO)' radio option, Browser the ISO file of any operation system (I'm using Linux Ubuntu OS ISO file as example) and click on 'Next' Button]     v. 'Easy Installation Information' Dialog will be displayed [Enter all the details and click on 'Next' Button] 'Name the Virtual Machine' Dialog will be displayed [ Enter any name for your virtual machine, select any location for saving the virtual machine (decide the location based on free space) and click on 'Next' Button] 'Specify Disk Space' dialog will be displayed [Keep the defaults and click on 'Next' Button]
            vi. 'Ready to Create Virtual Machine' Dialog will be displayed     vii. Booting/Installation of Operating System will start in the VMware Window
              viii. Go through the Installation process of the Operating System till the end [You will be asked to provide Username and Password to login to the Virtual Machine OS]
        • Running Virtual Environments using VMware Workstation Software:
        •    i. Power Off the Virtual Machine if it is already running
            ii. Go to the location of the virtual machine file which is saved in your system   iii. Click on the 'Three Square' Thumb nailed file to launch/Open the Virtual Machine
                iv. VMware Workstation window will get displayed [Click on 'Power On the Virtual Machine' option]
                v. 'Powered Off' Virtual machine will get powered on after selecting the 'Power On the Virtual Machine' option
          • Managing the Virtual Environments using VMware Workstation Software:
            • Power On/Start the Virtual Machine if Powered Off
            • Try the Snapshot Manager Functionality and know its Uses in Software Testing [Find the Snapshot Manager Uses using the below explained Cases]
            • Before Trying the below Cases, take a base snapshot of the virtual machine using the Snapshot manager [Taking Snapshot is nothing but storing the current state of the Virtual OS]
            • Base Snapshot will be created and displayed in the Snapshot Manager. And you are not at the Base Snapshot of the Virtual Machine
            • Try the below cases to get more idea on Snapshot manage
            Case1: (Example:- Installation Testing)
            • Install any Software in the Virtual OS machine [For Example:- Install 'Mime' software in Typical Mode]
            • Take a Snapshot using the Snapshot Manager after installing the Software in Typical Mode [For Example:- Name the Snapshot as 'Mime-Typical]
            • Now navigate back to the Base Snapshot using the Snapshot Manager [Select the old Snapshot in the Snapshot manager and click on 'Go To' Button]
            • Observe that you will be shown the current position in the Snapshot Manager during and after the reverting process
            • As we have reverted to base Snapshot, we will not find any Mime software installed in this software
            • Now install the Mine Software in custom mode and take a snapshot using Snapshot Manager [Name the snapshot as 'Mine-Custom']
            • Now we are in the Mine-Custom Snapshot and if we want to test the software in the Typical Mode – We can easily revert/go to the Mime-Typical Snapshot [Uses:- No need of installing the Mine Software in Typical Mode again] – Note:- Current state ‘You are here’ in Snapshot manager  will be lost while reverting back. So you have to take snapshot of the current state before reverting if required.
            • We can even revert back to the Mine-Custom Snapshot or Base Snapshot when we are in the ‘Mine-Typical’ snapshot
            Case2: (Example: - Check the functionality of the software on fresh installation)
            • Revert to the base snapshot
            • Install the software and take a snapshot [Name the snapshot as ‘Fresh Installation’]
            • Test the software
            • Suppose if we are getting an error after testing for a long time – We’ll decide to test the failing test scenario on a fresh installation – So we've to revert/go to the ‘Fresh Installation’ software and try the failing test scenario – Note: - Take snapshot on the current state before reverting to investigate more on the issue.
            •  As a result we’ll navigate to ‘Fresh Installation’ state without reinstalling the software for testing on fresh installation
              Note:
              • Install VMware Tools - To move the Cursor easily between the Virtual Machine and Host System [Launch VMware Workstation -> VM menu -> Install VMware Tools]
              • Press 'Ctrl+Alt+Insert' when the following dialog gets displayed in the Virtual Machine

              'Software Releases' topic will be explained in the next post.