About Synchronizing the Test Run - WinRunner

Applications do not always respond to user input at the same speed from one test run to another. This is particularly common when testing applications that run over a network. A synchronization point in your test script instructs WinRunner to suspend running the test until the application being tested is ready, and then to continue the test.

There are three kinds of synchronization points: object/window synchronization points, property value synchronization points, and bitmap synchronization points.

  • When you want WinRunner to wait for an object or a window to appear, you create an object/window synchronization point.
  • When you want WinRunner to wait for an object or a window to have a specified property, you create a property value synchronization point.
  • When you want WinRunner to wait for a visual cue to be displayed, you create a bitmap synchronization point. In a bitmap synchronization point, WinRunner waits for the bitmap of an object, a window, or an area of the screen to appear.

For example, suppose that while testing a drawing application you want to import a bitmap from a second application and then rotate it. A human user would know to wait for the bitmap to be fully redrawn before trying to rotate it. WinRunner, however, requires a synchronization point in the testscript after the import command and before the rotate command. Each time the test is run, the synchronization point tells WinRunner to wait for the import command to be completed before rotating the bitmap.

In another example, suppose that while testing an application you want to check that a button is enabled. Suppose that in your application the button becomes enabled only after your application completes an operation over the network. The time it takes for the application to complete this network operation depends on the load on the network. A human user would know to wait until the operation is completed and the button is enabled before clicking it. WinRunner, however, requires a synchronization point afterlaunching the network operation and before clicking the button. Each time the test is run, the synchronization point tells WinRunner to wait for the button to become enabled before clicking it.

You can synchronize your test to wait for a bitmap of a window or a GUI object in your application, or on any rectangular area of the screen. You can also synchronize your test to wait for a property value of a GUI object, such as “enabled,” to appear. To create a synchronization point, you choose a Insert > Synchronization Point command indicate an area or an object in the application being tested. Depending on which Synchronization Point command you choose, WinRunner either captures the property value of a GUI object or a bitmap of a GUI object or area of the screen, and stores it in the expected results folder (exp). You can also modify the property value of a GUI object that is captured before it is saved in the expected results folder.

A bitmap synchronization point is a synchronization point that captures a bitmap. It appears as a win_wait_bitmap or obj_wait_bitmap statement in the test script. A property value synchronization point is a synchronization point that captures a property value. It appears as a _wait_info statement inyour test script, such as button_wait_info or list_wait_info. When you run the test, WinRunner suspends the test run and waits for the expected bitmap or property value to appear. It then compares the current actual bitmap or property value with the expected bitmap or property value saved earlier. When the bitmap or property value appears, the test continues.


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

WinRunner Topics