Software Installation/Uninstallation Testing
Have you performed software installation testing? How was the experience? Well, Installation testing (Implementation Testing) is quite interesting part of software testing life cycle.
If your installation is successful on the new system then customer will be definitely happy but what if things are completely opposite. If installation fails then our program will not work on that system; not only this but can also leave user’s system badly damaged. User might require to reinstall the full operating system.
In above case will you make any impression on user? Definitely not! Your first impression to make a loyal customer is ruined due to incomplete installation testing.
What you need to do for a good first impression? Test the installer appropriately with combination of both manual and automated processes on different machines with different configuration. Major concern of installation testing is Time! It requires a lot of time to even execute a single test case. If you are going to test a big application installer then think about time required to perform so many test cases on different configurations.
We will see different methods to perform manual installer testing and some basic guideline for automating the installation process.
To start installation testing first decide on how many different system configurations you want to test the installation. Prepare one basic hard disk drive. Format this HDD with most common or default file system, install most common operating system (Windows) on this HDD. Install some basic required components on this HDD. Each time create images of this base HDD and you can create other configurations on this base drive. Make one set of each configuration like Operating system and file format to be used for further testing.
How we can use automation in this process? We will make some systems dedicated for creating basic images (use software’s like Norton Ghost for creating exact images of operating system quickly) of base configuration. This will save you tremendous time in each test case. For example if time to install one OS with basic configuration is say 1 hour then for each test case on fresh OS you will require 1+ hour. But creating image of OS will hardly require 5 to 10 minutes and you will save approximately 40 to 50 minutes!
You can use one operating system with multiple attempts of installation of installer. Each time uninstalling the application and preparing the base state for next test case. Be careful here that your uninstallation program should be tested before and should be working fine.
Installation testing tips with some broad test cases:
- Use flow diagrams to perform installation testing. Flow diagrams simplify our task.
- If you have previously installed compact basic version of application then in next test case install the full application version on the same path as used for compact version.
- If you are using flow diagram to test different files to be written on disk while installation then use the same flow diagram in reverse order to test uninstallation of all the installed files on disk.
- Use flow diagrams to automate the testing efforts. It will be very easy to convert diagrams into automated scripts.
- Test the installer scripts used for checking the required disk space. If installer is prompting required disk space 1MB, then make sure exactly 1MB is used or whether more disk space is utilized during installation. If yes flag this as error.
- Test disk space requirement on different file system format. Like FAT16 will require more space than efficient NTFS or FAT32 file systems.
- If possible set a dedicated system for only creating disk images. As mentioned above this will save your testing time.
- Use distributed testing environment in order to carry out installation testing. Distributed environment simply saves your time and you can effectively manage all the different test cases from a single machine. The good approach for this is to create a master machine, which will drive different slave machines on network. You can start installation simultaneously on different machines from the master system.
- Try to automate the routine to test the number of files to be written on disk. You can maintain this file list to be written on disk in an excel sheet and can give this list as an input to automated script that will check each and every path to verify the correct installation.
- Use software’s available freely in market to verify registry changes on successful installation. Verify the registry changes with your expected change list after installation.
- Forcefully break the installation process in between. See the behavior of system and whether system recovers to its original state without any issues. You can test this “break of installation” on every installation step.
- Disk space checking: This is crucial in the installation-testing scenario. You can choose different manual and automated methods to do this checking. In manual methods you can check free disk space available on drive before installation and disk space reported by installer script to check whether installer is calculating and reporting disk space accurately. Check the disk space after the installation to verify accurate usage of installation disk space. Run various combination of disk space availability by using some tools to automatically make disk space full while installation. Check system behavior on low disk space conditions while installation.
- As you check installation you can test for uninstallation also. Before each new iteration of installation make sure that all the files written to disk are removed after uninstallation. Some times uninstallation routine removes files from only last upgraded installation keeping the old version files untouched. Also check for rebooting option after uninstallation manually and forcefully not to reboot.