Friday, 22 April 2011

Synchronization in QTP

WHAT IS SYNCHRONIZATION ?
    Synchronization refers to adding a step in the script that instructs Quick Test to wait for a particular object before proceeding to the next step during playback.
   
When do you need SYNCHRONIZATION ?
       When you observe that the application takes a longer time to process information sent or respond to a client request, add a synchronization step while recording. For example:
    - A progress bar to reach 100%.
    - A button to become enabled.
    - A window or pop-up message to open.

HOW TO ADD SYNCHRONIZATION

  1. Synchronization can be added ONLY during recording.
  2. Identify the object to be synchronized.
  3. Navigate to the window where the object is located.
  4. Locate the step in the test that corresponds to the object.
  5. Start recording and add the synchronization point. 
TWO WAYS TO SET SYNCHRONIZATION

1. Global synchronization value for all Objects.  
Instructs Quick Test to wait for all the objects for a specific amount of time.

 2. Synchronization of a specific Object.
 Instructs Quick Test to wait for a specific object only.


GLOBAL SYNCHRONIZATION VALUE FOR ALL OBJECTS

















Menu -> Test-> Settings-> Run

For every object in the test, Quick Test can wait a maximum number of milliseconds specified in the settings.

SYNCHRONIZATION OF SPECIFIC OBJECT




























Menu -> Insert -> Step -> Synchronization Point
Quick Test shall pause the test until the object property achieves the value specified here (or until the specific timeout amount is exceeded).
Quick Test uses one of the object’s properties as the waiting criteria. E.g. ‘Text’ property for window, ‘Label’ property for buttons etc.

   


No comments:

Post a Comment