Page 140 - SOFTWARE TESTING & QUALITY ASSURANCE
P. 140

Unit 9: Automation Testing



               Figure 9.2 depicts a computer that acts as a driver test tool.
                                    Figure 9.2: A Computer that Acts as a Driver Test Tool to
                                     Replace the Keyboard and Mouse of a System Being
                                                      Tested.
























               Here, a computer is being depicted as a driver test tool that can replace the keyboard and mouse of a
               system being tested. Assume that the software being tested requires large amounts of data to be entered
               in the test cases. If there are a few hardware modifications and a small number of software tools, the
               user can replace the keyboard and mouse of the system being tested with an additional computer that
               can operate as a driver. With this driver computer, one can write simple programs that automatically
               generate the appropriate keystrokes and mouse movements to test the software.
               Alternatively, a user can also opt for another method, that is, a user can simply run a program on the
               first system that sends keystrokes to the software being tested. But again there are two problems
               involved in this. They are:
                1.   If the software or the operating system is not multitasking, it is not possible to run another driver
                     program at the same time.
                2.   If the keystrokes and mouse movements are sent from an external computer, the test system is
                     non-invasive. If a driver program is being operated on the same system as the software being
                     tested, it is invasive and may not be considered as an acceptable test scenario.
               Stubs
               Stubs are used to receive or resend data that the software sends. They do not control or operate the
               software being tested. For example,

                                  If a user wants to test software that sends data to a printer, one way to test it is
                                  to enter data, print it, and check the result. This is a slow , incompetent, and
                                  error prone process. It is also difficult to obtain the appropriate results as the
                                  user may not know if the output had a single missing pixel or if the color was
                                  different. Here, accurate results can be obtained if the user replaces the printer
                                  with another computer operating on stub software.

               Stubs are often used when the software needs to communicate with external devices. They make the
               testing process efficient as they permit testing despite lacking the hardware.









                                        LOVELY PROFESSIONAL UNIVERSITY                          133
   135   136   137   138   139   140   141   142   143   144   145