UFT Tutorial 17

UFT Class 17
(Synchronization, Checkpoints Part-1)
 Synchronization UFT amongst AUT
What is Synchronization?

UFT        AUT

It is a procedure of matching the speeds of UFT tool together with AUT, inwards gild to become proper execution together with Result.

Why Synchronization?

During Test execution UFT gives instructions i past times i amongst same speed, but AUT takes less fourth dimension for unopen to steps execution
and to a greater extent than fourth dimension for unopen to steps execution, inwards gild to proceed them inwards sync together with thus Synchronization is required.

When Synchronization is required?

UFT tool default Synchronization fourth dimension is twenty seconds, if whatsoever stride takes to a greater extent than than twenty seconds for execution together with thus Synchronization is required.

Types of Synchronization

a) Conditional Synchronization

b) Unconditional Synchronization

How to Synchronize UFT together with AUT?

a) Insert hold off statement

Syntax:

Wait (Time inwards seconds) or Wait Time inwards seconds

Ex:

Wait (10)

Note: It is conditional Synchronization, waits maximum fourth dimension eventhough performance is completed.

b) Insert Synchronization point

To insert Synchronization point, position the Object together with belongings on which nosotros necessitate to insert Synchronization point.

Ex:

"Delete Order" Button is Object

Enabled property

Syntax:

Object.WaitProperty "PropertyName", Value, Time inwards milli seconds (Time is optional)

Note: It waits required fourth dimension only.

Example:

Window("Flight Reservation").WinButton("Delete Order").WaitProperty "enabled", True, 30000

Navigation:

Place cursor inwards desired location

> Select Record mode

> Design bill of fare

> Synchronization point

> Show the object

> Select Property

> Enter Property value

> Set Time inwards mille seconds > OK
----------------------------------------
c) Increase Tool default time

Navigation:

File menu

> Settings

> Run

> Select Object synchronization Timeout

> Chang the value

> OK
-------------------------------------
Note: If nosotros growth tool default time, that settings applicable for all steps inwards that test.

-----------
d) Using Exist property

'Exist belongings for Synchronization
SystemUtil.Run "C:\Program Files\HP\Unified Functional Testing\samples\flight\app\flight4a.exe","","C:\Program Files\HP\Unified Functional Testing\samples\flight\app\",""
Dialog("Login").Activate
Dialog("Login").WinEdit("Agent Name:").Set "asdf"
Dialog("Login").WinEdit("Password:").SetSecure "54f7bb545b92f523dfa596ccfead0af7e4459d54"
Dialog("Login").WinButton("OK").Click

If Window("Flight Reservation").Exist(10) Then
Window("Flight Reservation").WinButton("Button").Click
Window("Flight Reservation").Dialog("Open Order").WinCheckBox("Order No.").Set "ON"
Window("Flight Reservation").Dialog("Open Order").WinEdit("Edit").Set "1"
Window("Flight Reservation").Dialog("Open Order").WinButton("OK").Click
End If
--------------------------------
'Exist belongings for Error Handling
If Not Dialog("Login").Exist(3) Then
SystemUtil.Run "C:\Program Files\HP\Unified Functional Testing\samples\flight\app\flight4a.exe","","C:\Program Files\HP\Unified Functional Testing\samples\flight\app\",""
End If

Dialog("Login").Activate @@ hightlight id_;_1508758_;_script infofile_;_ZIP::ssf1.xml_;_
Dialog("Login").WinEdit("Agent Name:").Set "asdf" @@ hightlight id_;_1181056_;_script infofile_;_ZIP::ssf2.xml_;_
Dialog("Login").WinEdit("Password:").SetSecure "54f7bb545b92f523dfa596ccfead0af7e4459d54" @@ hightlight id_;_1705340_;_script infofile_;_ZIP::ssf3.xml_;_
Dialog("Login").WinButton("OK").Click @@ hightlight id_;_1246642_;_script infofile_;_ZIP::ssf4.xml_;_
----------------------------------------
Select an appropriate method
----------------------------------
Advantages of Wait statement:

a) It won't corrupt

b) No object reference is required

c) In gild to reveal the Test execution procedure together with thus hold off tilt is the alone solution

d) In gild to capture concealment shots during execution together with thus hold off tilt is useful.

e) It tin post away hold upwards used internally equally good equally externally

f) It is the alone solution for Non-recordable steps.
-------------------------------------------------------
Note: UFT Tool default synchronization Time is alone for Recordable Steps
It can't hold upwards used for Non-recordable steps

Ex:
Window("Flight Reservation").Activate @@ hightlight id_;_984596_;_script infofile_;_ZIP::ssf1.xml_;_
Window("Flight Reservation").WinButton("Button").Click @@ hightlight id_;_1705442_;_script infofile_;_ZIP::ssf2.xml_;_
Window("Flight Reservation").Dialog("Open Order").WinCheckBox("Order No.").Set "ON" @@ hightlight id_;_3474724_;_script infofile_;_ZIP::ssf3.xml_;_
Window("Flight Reservation").Dialog("Open Order").WinEdit("Edit").Set "1" @@ hightlight id_;_1705398_;_script infofile_;_ZIP::ssf4.xml_;_
Window("Flight Reservation").Dialog("Open Order").WinButton("OK").Click @@ hightlight id_;_1508954_;_script infofile_;_ZIP::ssf5.xml_;_
Window("Flight Reservation").WinEdit("Tickets:").Set "5" @@ hightlight id_;_2884892_;_script infofile_;_ZIP::ssf7.xml_;_
Window("Flight Reservation").WinButton("Update Order").Click @@ hightlight id_;_656894_;_script infofile_;_ZIP::ssf8.xml_;_
Wait 9
Message = Window("Flight Reservation").ActiveX("Threed Panel Control").GetROProperty("text") @@ hightlight id_;__;_script infofile_;_ZIP::ssf9.xml_;_

If Message = "Update Done..." Then
                Result = "Order Updated - Passed"
                Else
                Result = "Order Not Updated - Failed"
End If
Msgbox Result
--------------------------------------------------------------------
Insert Checkpoints
---------------------
What is Checkpoint?

It is a verification point, takes expected outcome from the User together with compares amongst actual results during examination execution together with provides Test Result.

Expected Result: User (Tester)

Actual Result: During Test Execution

Test result: UFT render examination outcome later comparison expected amongst actual.

Types of Checkpoints
                1) Standard Checkpoint
                2) Text Checkpoint
                3) Text expanse Checkpoint
                4) Bitmap Checkpoint
                5) Database Checkpoint
                6) Accessibility Checkpoint
                7) XML Checkpoint (From Resource)
                8) XML Checkpoint (from Application)
                9) File Content Checkpoint
                10) Page Checkpoint
                11) Image Checkpoint
                12) Table Checkpoint

Drawbacks of Checkpoints
-------------------------------

Sumber http://www.gcreddy.com/
Post a Comment (0)
Previous Post Next Post