Teaching WinRunner the GUI with the RapidTest Script Wizard - WinRunner

WinRunner must learn the information about the GUI objects in your application in order to add it to the GUI map file. WinRunner can learn the information it needs about the properties of GUI objects in the following ways:

  • using the RapidTest Script wizard to teach WinRunner the properties of all GUI objects in every window in your application
  • recording in your application to teach WinRunner the properties of all GUI objects on which you record
  • using the GUI Map Editor to teach WinRunner the properties of an individual GUI object, window, or all GUI objects in a window

Teaching WinRunner the GUI with the RapidTest Script Wizard

You can use the RapidTest Script wizard before you start to test in order to teach WinRunner all the GUI objects in your application at once. This ensures that WinRunner has a complete, well-structured basis for all your Context Sensitive tests. The descriptions of GUI objects are saved in GUI map files. Since all test users can share these files, there is no need for each user to individually relearn the GUI.

The simplest and most thorough way for WinRunner to learn your application is by using the RapidTest Script wizard. The RapidTest Script wizard enables WinRunner to learn all windows and objects in yourapplication being tested at once. The wizard systematically opens each window in your application and learns the properties of the GUI objects it contains. WinRunner provides additional methods for learning the properties of individual objects.

WinRunner then saves the information in a GUI map file. WinRunner also creates a startup script which includes a GUI_load command that loads this GUI map file.

To teach WinRunner your application using the RapidTest Script wizard:

Click RapidTest Script Wizard in the WinRunner Welcome screen when you start WinRunner or choose Insert > RapidTest Script Wizard at any time. The RapidTest Script wizard welcome screen opens.

To teach WinRunner your application using the RapidTest Script wizard:

Click Next.
The Identify Your Application screen opens.
Identify Your Application screen opens
Click the pointing hand, and then click your application in order to identify it for the Script wizard. The name of the window you clicked appears in the Window Name box. Click Next.

The Select Tests screen opens.

Select Tests screen opens
Select the type(s) of test(s) you want WinRunner to create for you. When the Script Wizard finishes walking through your application, the tests you select are displayed in the WinRunner window.

You can choose any of the following tests:

  • GUI Regression Test - This test enables you to compare the state of GUI objects in different versions of your application. For example, it can check whether a button is enabled or disabled.To create a GUI Regression test, the wizard captures default information about each GUI object in your application. When you run the test on your application, WinRunner compares the captured state of GUI objects to their current state, and reports any mismatches.
  • Bitmap Regression Test - This test enables you to compare bitmap images of your application in different versions of your application. Select this test if you are testing an application that does not contain GUI objects.To create a Bitmap Regression test, the wizard captures a bitmap image of each window in your application. When you run the test, WinRunner compares the captured window images to the current windows, and reports any mismatches.
  • User Interface Test - This test determines whether your application adheres to Microsoft Windows standards. It checks that:
  • GUI objects are aligned in windows
  • All defined text is visible on a GUI object
  • Labels on GUI objects are capitalized
  • Each label includes an underlined letter (mnemonics)
  • Each window includes an OK button, a Cancel button, and a system Menu

When you run this test, WinRunner searches the user interface of your application and reports each case that does not adhere to Microsoft Windows standards.

  • Test Template - This test provides a basic framework of an automated test that navigates your application. It opens and closes each window, leaving space for you to add code (through recording or programming) that checks the window.

Click Next.

The Define Navigation Controls screen opens.

Define Navigation Controls screen opens
Enter the characters that represent navigation controls in your application. If you want the RapidTest Script wizard to pause in each window in your application, so that you can confirm which objects will be activated to open additional windows, select the Pause to confirm for each window check box.

Click Next.
Choose Express or Comprehensive learning flow. Click Learn. WinRunner begins to systematically learn your application, one window at a time. This may take several minutes depending on the complexity of your application.

Choose Yes or Noto tell WinRunner whether or not you want WinRunner to automatically activate this application whenever you invoke WinRunner.

Click Next.

Enter the full path and file name where you want your startup script and GUI Map file to be stored, or accept the defaults.

Click Next.

Enter the full path and file name where you want your test files to be stored, or accept the defaults.

Click Next.

Click OK to close the RapidTest Script wizard. The test(s) that were created based on the application that WinRunner learned are displayed in the WinRunner window.

Teaching WinRunner the GUI by Recording

WinRunner can also learn objects while recording in Context Sensitive mode (the default mode) in your application: you simply start to record a test and WinRunner learns the properties of each GUI object you use in your application. This approach is fast and enables a beginning user to create test scripts immediately. This is an unsystematic method, however, and should not be used as a substitute for the RapidTest Script wizard or the GUI Map Editor if you plan to develop comprehensive test suites.

When you record a test, WinRunner first checks whether the objects you select are in the GUI map. If they are not in the GUI map, WinRunner learns the objects.

WinRunner adds the information it learned to the temporary GUI map file. To save the information in the temporary GUI map file, you must save this file before exiting WinRunner.

In general, you should use recording as a learning tool for small, temporary tests only. Use the RapidTest Script wizard or the GUI Map Editor to learn the entire GUI of your application.

Teaching WinRunner the GUI Using the GUI Map Editor

WinRunner can use the GUI Map Editor to learn an individual object or window, or all objects in a window.

To teach GUI objects to WinRunner using the GUI Map Editor:

Choose Tools GUI Map Editor. The GUI Map Editor opens.
Click Learn. The mouse pointer becomes a pointing hand.

To teach GUI objects to WinRunner using the GUI Map Editor

  • To learn all the objects in a window, click the title bar of the window. When prompted to learn all the objects in the window, click Yes(the default).
  • To learn only a window, click the title bar of the window. When prompted to learn all the objects in the window, click No.
  • To learn an object, click the object.

(To cancel the operation, click the right mouse button.)

Place the pointing hand on the object to learn and click the left mouse button.

To learn all the objects in a window, place the pointing hand over the window’s title bar and click the left mouse button.

To teach GUI objects to WinRunner using the GUI Map Editor
WinRunner adds the information it learns to the temporary GUI map file. To keep the information in the temporary GUI map file, you must save it before exiting WinRunner.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

WinRunner Topics