QTP Synchronization

I know what synchronization is but I would like to know how that concept works, any help here is really appreciated

Questions by Vignesh_1985

Showing Answers 1 - 12 of 12 Answers

If you do not want QuickTest to perform a step or checkpoint until an object in your application achieves a certain status, you should insert a synchronization point to instruct QuickTest to pause the test until the object property achieves the value you specify (or until a specified timeout is exceeded).

For example, suppose you record a test on a flight reservation application. You insert an order, and then you want to modify the order. When you click the Insert Order button, a progress bar is displayed and all other buttons are disabled until the progress bar reaches 100%. Once the progress bar reaches 100%, you record a click on the Update Order button.

Without a synchronization point, QuickTest may try to click the Update Order button too soon during a test run (if the progress bar takes longer than the test's object synchronization timeout), and the test will fail.

akothuru

  • Dec 15th, 2008
 

Three methods are available in QTP for Synchronization

WaitProperty – method is used to instruct QTP to wait the execution process until it
matches with the object property value based on the specified time.
E.g. Browser("Welcome: Mercury Tours").WaitProperty "name","Welcome: Mercury Tours", 5000

name -  property name
Welcome: Mercury Tours  - property value
5000 - number of milli seconds to wait
Wait – method is used to instruct the QTP to wait the execution process based on
the specified time only but not on any condition
E.g. Wait 5 (or) Wait(5) ‘5 Seconds
Exist – method is used to instruct QTP to wait the execution process based on the
specified time and returns Boolean value as per the object existence
E.g. var_Exist = Browser(“Welcome: Mercury Tours”).Exist(5) ‘5 seconds

  Was this answer useful?  Yes

priyankvyas

  • Jan 15th, 2009
 

To understand the concept of Syncronization in QTP, just drill down why we need it. For illustration take a scenario that

1) You are inserting an order and than stop your recording, remember not to close or do any other operation after that.

2)Now playback the same test, You find it QTP test result is generated before order is inserted.

That shows QTP test execution speed is higher than Application execution speed.

By providing synchronization point tester tries to match the execution speed of QTP and Application,because it may happen that the next operation that you are performing is depending on previous result and it is not generated yet.

Default wait time for any object is 20 second and object is not appearing in 20 second than that may fail script. So to avoid such condition we use Synchronization Points

  Was this answer useful?  Yes

manymore

  • Dec 17th, 2010
 

qtp is designed in such a way that the default wait time to execute a action is 20 seconds.
on the application when we perform an action (exmple:  related to storing the data that we give in the database, in real time it takes  time to store. if it is more than 20 sec).
when we RECORD  ACTIONS on the application, containing this particular ACTION using QTP and RUN,  as the application takes more time than 20 seconds to complete this action, QTP will show error message stating the object is disabled.
and this is because of the default settings in QTP.
so even though the application is working fine, QTP shows error message because of internal default settings.
in This scenario
we can use
>synchronization point for the Tool to wait till the ACTION is enabled so that QTP can successfully execute.
or
>we can use wait statement
or
>we can increase the QTP default time settings itself
so that we can automate the test properly.

according to the situation.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions