Knowledge Share
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Knowledge Share

Knowledge is NOT Power IMPLEMENTATION of knowledge is Power!!!
 
HomePortalGalleryLatest imagesRegisterLog in

 

 QTP Notes

Go down 
AuthorMessage
Admin
Admin



Posts : 142
Points : 59554454
Reputation : 0
Join date : 2007-12-29
Location : Chennai

QTP Notes Empty
PostSubject: QTP Notes   QTP Notes Icon_minitimeMon Dec 01, 2008 10:05 am

4.0 Synchronization
4.1 Synchronizing Your Tests

When you run tests, your application may not always respond with the same speed. For example, it might take a few seconds:

· For a progress bar to reach 100%
· For a button to become enabled
· For a button to become enabled
· For a window or pop-up message to open

You can handle these anticipated timing problems by synchronizing your test to ensure that QuickTest waits until your application is ready before performing a certain step
4.2 Options to Synchronize Tests
There are several options that you can use to synchronize your test:

· You can insert a synchronization point, which instructs QuickTest to pause the test until an object property achieves the value you specify.
· You can insert Exist or Wait statements that instruct QuickTest to wait until an object exists or to wait a specified amount of time before continuing the test.
· You can also increase the default timeout settings in the Test Settings and Options dialog boxes in order to instruct QuickTest to allow more time for certain events to occur.
4.1.1 4.2.1 Inserting Synchronization Point
· Begin recording your test.
· Display the screen or page in your application that contains the object for which you want to insert a synchronization point.

· In QuickTest choose Insert > Step > Synchronization Point. The mouse pointer turns into a pointing hand.

· Click the object in your application for which you want to insert a synchronization point.
If the location you click is associated with more than one object in your application, the Object Selection – Synchronization Point dialog box opens.

Select the object for which you want to insert a synchronization point, and click OK.
The Add Synchronization Point dialog box opens.

· The Property name list contains the test object properties associated with the object. Select the Property name you want to use for the synchronization point.

· Enter the property value for which QuickTest should wait before continuing to the next step in the test.

· Enter the synchronization point timeout (in milliseconds) after which QuickTest should continue to the next step, even if the specified property value was not achieved.

· Click OK. A WaitProperty step is added to your test.

For example, if you insert a synchronization point for the Update Order button, it may look something like this:

Window("Flights").WinButton("Update Order").WaitProperty "enabled", 1, 3000

4.1.2 4.2.2 Adding Exist and Wait Statements

You can use Exist and/or Wait statements in the Expert View to instruct QuickTest to wait for a window to open or an object to appear.

Exist statements return a Boolean value indicating whether or not an object currently exists.
Example following statement returns whether Flights Table is displayed:
y=Window("Flight Reservation").Dialog("Flights Table").Exist

Wait statements instruct QuickTest to wait a specified amount of time before proceeding to the next.

Example following statement waits for 10 seconds:
Wait (10)

4.1.3 Global synchronization Settings
Modifying Timeout Values
· To modify the maximum amount of time that QuickTest waits for an object to appear, change the Object Synchronization Timeout (Test > Settings > Run tab).
· To modify the amount of time that QuickTest waits for a Web page to load, change the Browser Navigation Timeout (Test > Settings > Web tab).
4.3 Transactions
The time taken by a section of the test to run can be measured by defining Transaction.
A transaction represents the business process that you are interested in measuring. You define transactions within your test by enclosing the appropriate sections of the test with start and end transaction statements.
4.3.1 Inserting Transactions

You define the beginning of a transaction in the Start Transaction dialog box.

To insert a transaction:

· In the test tree, click the step where you want the transaction timing to
begin. The page is displayed in the Active Screen tab.
· Click the Start Transaction button or choose Insert > Start Transaction. The
Start Transaction dialog box opens.


· Enter a meaningful name in the Name box.
· Decide where you want the transaction timing to begin:
To insert a transaction before the current step, select Before current step.
To insert a transaction after the current step, select After current step.
· Click OK. A tree item with the Start Transaction icon is added to the test tree.
4.3.2 Ending Transactions
You define the end of a transaction in the End Transaction dialog box.
To end a transaction:
· In the test tree, click the step where you want the transaction timing to end. The page opens in the Active Screen.
· Click the End Transaction button or choose Insert > End Transaction. The End Transaction dialog box opens.


· The Name box contains a list of the transaction names you defined in the
current test. Select the name of the transaction you want to end.
· Decide where to insert the end of the transaction:
To insert a transaction before the current step, select Before current step.
To insert a transaction after the current step, select After current step.
· Click OK. A tree item with the End Transaction icon is added to the test tree.
5.0
Back to top Go down
https://knowledgeshare.forumotion.com
 
QTP Notes
Back to top 
Page 1 of 1
 Similar topics
-
» QTP Notes
» QTP Notes
» QTP Notes
» QTP Notes
» QTP Notes

Permissions in this forum:You cannot reply to topics in this forum
Knowledge Share :: Testing :: Automation-
Jump to: