Thursday, March 8, 2007

Recording Tips

Recording Tips
• Before starting to record, you should close applications that are not required for the test.

• Create the test so that it ends where it started. For example, if the test opens an application, make sure that it also closes the application at the end of the test run. This ensures that WinRunner is prepared to run repeated executions of the same test.

• When recording in Analog mode, avoid holding down the mouse button if this results in a repeated action. For example, do not hold down the mouse button to scroll a window. Instead, scroll by clicking the scrollbar arrow repeatedly. This enables WinRunner to accurately run the test.

• Before switching from Context Sensitive mode to Analog mode during a recording session, always move the current window to a new position on the desktop. This ensures that when you run the test, the mouse pointer will reach the correct areas of the window during the Analog portion of the test.

• When recording, if you click a non-standard GUI object, WinRunner generates a generic obj_mouse_click statement in the test script. For example, if you click a graph object, it records: obj_mouse_click (GS_Drawing, 8, 53, LEFT); If your application contains a non-standard GUI object that behaves like a standard GUI object, you can map this object to a standard object class so that WinRunner will record more intuitive statements in the test script. For more information refer to the "Configuring the GUI Map" chapter in your WinRunner User’s Guide.

• If you are working in the Global GUI Map File mode, then if you click an object whose description was not previously learned, WinRunner learns a description of the object and adds it to a temporary GUI map file. For more information, refer to the "Working in the Global GUI Map File Mode" chapter in your WinRunner User’s Guide.

• To easily switch between Context Sensitive and Analog modes, press F2.

• If you are working in Global GUI Map File mode, always check whether new windows or objects have been added to the temporary GUI map before you close WinRunner. If new objects have been added, save them to the appropriate GUI map file for your test.