When Should You Synchronize?
When you run tests, your application may not always respond to input with the same speed. For example, it might take a few seconds:
• to retrieve information from a database
• for a window to pop up
• for a progress bar to reach 100%
• for a status message to appear
WinRunner waits a set time interval for an application to respond to input. The default wait interval is up to 10 seconds. If the application responds slowly during a test run, WinRunner’s default wait time may not be sufficient, and the test run may unexpectedly fail.
If you discover a synchronization problem between the test and your application, you can either:
• Increase the default time that WinRunner waits. To do so, you change the value of the Timeout for Checkpoints and CS Statements option in the Run tab of the General Options dialog box (Settings > General Options). This method affects all your tests and slows down many other Context Sensitive operations.
• Insert a synchronization point into the test script at the exact point where the problem occurs. A synchronization point tells WinRunner to pause the test run in order to wait for a specified response in the application. This is the recommended method for synchronizing a test with your application.
In the following exercises you will:
. create a test that opens a new order in the Flight Reservation application and inserts the order into the database
. change the synchronization settings
. identify a synchronization problem
. synchronize the test
. run the synchronized test