UFT Class 5
(Record & Run Tests Part-2, Prerequisites for Test Design, Types of Objects inward UFT)
--------------------------------------------------
2) Analog Recording
It records user Actions on AUT based on x, y coordinates (Desktop or Application window)
User (Tester tin conduct the alternative either Desktop or Application window)
It tin tape normal operations also, exactly nosotros can't purpose this trend for normal operations.
Drawbacks:
i) It occupies to a greater extent than retention than Normal recording thence UFT execution performance volition endure reduced.
ii) It doesn’t generate steps for every user activity on AUT, it records all user actions
in a rail file, thence Test is non readable equally good equally editable.
----------------------
Requirement:
In our exam or thence actions are normal in addition to i or ii continuous mouse operations.
Select Normal in addition to Analog Record modes.
3) Low marker Recording
It records or thence operations on Non-supported environments
Drawbacks:
i) It occupies to a greater extent than retention than Normal recording thence UFT execution performance volition endure reduced.
ii) It considers all objects inward ii categories alone (Window, WinObject), thence Test is non readable.
4) Insight Recording
It records or thence operations on Non-supported environments in addition to capture object images also.
Drawbacks:
i) It occupies to a greater extent than retention than Normal recording thence UFT execution performance volition endure reduced.
ii) Test is non readable.
-------------------------------------
Advantages of Recording
Disadvantages of Recording
------------------------------------------------
UFT Test Process
Generating Basic Tests
Object Repository based Test Design
Recording
Keyword driven methodology
Prerequisites for Generating Tests
---------------------------------------
i) Test Scenario:
Ex:
a) Login Functionality inward Flight Reservation Application
b) Login Functionality inward Gmail Application
-------------------------------
ii) Steps / Navigation
a) Login Functionality inward Flight Reservation Application
1) Launch the Application
2) Select the Login Dialog box
3) Enter Agent Name
4) Enter Password
5) Click OK Button
b) Login Functionality inward Gmail Application
1) Launch the Browser in addition to Navigate to Gmail abode page (www.gmail.com)
2) Enter Email
3) Enter Password
4) Click Sign inward Button
---------------------------------------
iii) Verification points
a) Login Functionality inward Flight Reservation Application
Check the beingness of Flight Reservation window, if exists thence overstep otherwise fail.
b) Login Functionality inward Gmail Application
Check the beingness of Email page, if exists thence overstep otherwise fail.
-----------------------------------------
iv) Error Handling
a) Login Functionality inward Flight Reservation Application
Close the Error Popup in addition to Cancel the Login Dialog.
b) Login Functionality inward Gmail Application
Read Error message in addition to closed the Browser window.
---------------------------------
v) Input Data
a) Login Functionality inward Flight Reservation Application
Agent Name=
Password=
b) Login Functionality inward Gmail Application
Email=
Password=
-----------------------------------
vi) Add Comments
-----------------------------------
Note: These are mutual for all types of exam design.
vii) Test Objects information
viii) Methods/Operations Information
--------------------------------------------
Types of Objects inward UFT
In UFT exam automation nosotros function amongst four types of Objects
i) Run-time objects
The objects introduce inward the Application.
Software objects convey dissimilar states.
States of Software Objects:
Enabled,
Disabled,
Visible,
Hidden,
Focused
------------------------
ii) Test Objects
Reference of Run-time object is Called Test Object
Test object names vary from i surroundings to another.
Ex:
Button inward Standard windows surroundings -WinButton
Button inward VB surroundings -VbButton
Button inward Web surroundings -WebButton
---------------------------
Browser - Browser
Page-Page
Link-Link
---------------------
How to larn Test object names:
Using Object Spy
Tools Menu-> Object Spy
How to larn all exam objects names inward an environment
Using Object Identification
Tools menu-> Object Identification-> Select Environment
3 types:
a) Constant Objects (Properties values are fixed)
b) Dynamic Object (Properties values modify dynamically throughout the execution)
Using Regular expressions nosotros tin handgrip Dynamic objects.
c) Duplicate Objects (Two or to a greater extent than objects amongst same properties)
Using index belongings nosotros tin handgrip duplicate objects.
---------------------------------------
iii) Utility Objects
They are UFT reserved objects used for Testing in addition to Result reporting.
Ex:
SystemUtil
RepositoriesCollection
Environment
Services
Reporter
etc...
-----------------
Launch Software Applications
a) Windows based Application
Syntax:
SystemUtil.Run "Path of the Application"
Ex:
SystemUtil.Run "C:\Program Files\HP\Unified Functional Testing\samples\flight\app\flight4a.exe"
Or
InvokeApplication "C:\Program Files\HP\Unified Functional Testing\samples\flight\app\flight4a.exe"
SystemUtil is Utility object
InvokeApplication is Utility statement
b) spider web based Application
Syntax:
SystemUtil.Run "Path of the Browser", "url"
Ex:
SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe", "www.icicibank.com"
iv) Automation Objects
Automation Objects are used defined objects used to function amongst drives, Folders, files in addition to Databases.
a) File System Object
It is used to function amongst Drives, Folders in addition to falt files.
Class value -("Scripting.FileSystemObject")
b) Excel Application Object
It is used to perform operations on Excel Application.
Class value ("Excel.Application)
c) Word Application Object
It is used to perform operations on Word Application.
Class value ("Word.Application)
d) Database Connection object ("Adodb.Connection")
It is used to connect to a Database
e) Database Recordset object ("Adodb.Recordset")
It is used to perform operations Database Tables(Records)
f) Dictionary Object ("Scripting.Dictionary")
It is used to define Key, value pairs
------------------------------------------------
Object Repository
------------------
It is a storage house for storing Test Objects information.
2 Types of Object Repository inward UFT:
i) Local Object Repository (Internal file)
-> UFT Creates a Local repository for every activity during Recording.
-> User(Tester) tin edit Local objects(Add, Rename, Delete)
-> Local Repository file is internal file saves along amongst the Test.
-> UFT Maintains Local Object Repositories.
---------------------------------------
ii) Shared Object Repository(External file, extension .tsr)