Synchronization:
Synchronization
is a process of matching the speeds of both the tool and the application in
order to keep them in sync with each other to obtain proper testing results
Here
the main concept is making the tool to wait till the application finishes its
work it can be done in three ways
1.
Inserting
the synchronization point
2.
Increasing
the default time
3.
Inserting
the wait statement
Navigation
for inserting the synchronization point:
·
Keep the
cursor in the desired location
·
Keep the
tool under recording mode
·
Activate
the menu item insert
·
Go to
step select the option sync point
·
Click on
desired object
·
Click on
ok
·
Select
the desired property
·
Specify
the desired property value
·
Specify
desired extra time
·
Click on
ok
·
Stop
recording
In order to avoid above navigation one can directly
type the statement in the desired location with the following syntax:
SYNTAX: Object hierarchy. Wait property”Property
name” property value, extra time in milliseconds
Example: Window (“flight reservation”).win button(“delete
order”).wait property”enabled”,true,17000
Navigation
for increasing the default time:-
·
Activate
the menu item test
·
Select
the option settings
·
Select
the run tab
·
Specify
the desired time in milliseconds in the object synchronization time out field
·
Click on
apply and ok
Syntax for Wait Statement:
Wait
(time in seconds)
Example: Wait (17)
Where Synchronization is required:
During test execution QTP gives instructions one by one with same
speed, but AUT takes less time for some operations execution and more time for
some operations execution, that time we may not get proper execution and
results. In order to get proper results in between QTP & AUT
synchronization is required.
There are several methods available in QTP for synchronization.
1. Inserting Wait statements.
2. Inserting Synchronization points.
No comments:
Post a Comment