UFT Tutorial 5

UFT Class 5
(Record & Run Tests Part-2, Prerequisites for Test Design, Types of Objects in UFT)
--------------------------------------------------
2) Analog Recording

It records user Actions on AUT based on x, y coordinates (Desktop or Application window)
User (Tester can select the option either Desktop or Application window)

It can record normal operations also, but we can't use this mode for normal operations.

Drawbacks:

i) It occupies more memory than Normal recording then UFT execution performance will be reduced.

ii) It doesn’t generate steps for every user action on AUT, it records all user actions
in a track file, so Test is not readable as well as editable.
----------------------
Requirement:

In our test some actions are normal and one or two continuous mouse operations.

Select Normal and Analog Record modes.

3) Low level Recording

It records some operations on Non-supported environments

Drawbacks:

i) It occupies more memory than Normal recording then UFT execution performance will be reduced.

ii) It considers all objects in two categories only (Window, WinObject), so Test is not readable.

4) Insight Recording

It records some operations on Non-supported environments and capture object images also.

Drawbacks:


i) It occupies more memory than Normal recording then UFT execution performance will be reduced.

ii) Test is not 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 in Flight Reservation Application

b) Login Functionality in Gmail Application
-------------------------------
ii) Steps / Navigation

a) Login Functionality in 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 in Gmail Application

                1) Launch the Browser and Navigate to Gmail home page (www.gmail.com)
                2) Enter Email
                3) Enter Password
                4) Click Sign in Button
---------------------------------------
iii) Verification points

a) Login Functionality in Flight Reservation Application

Check the existence of Flight Reservation window, if exists then pass otherwise fail.

b) Login Functionality in Gmail Application

Check the existence of Email page, if exists then pass otherwise fail.
-----------------------------------------
iv) Error Handling

a) Login Functionality in Flight Reservation Application

Close the Error Popup and Cancel the Login Dialog.

b) Login Functionality in Gmail Application

Read Error message and close the Browser window.
---------------------------------
v) Input Data

a) Login Functionality in Flight Reservation Application

Agent Name=
Password=

b) Login Functionality in Gmail Application
Email=
Password=
-----------------------------------
vi) Add Comments
-----------------------------------
Note: These are common for all types of test design.

vii) Test Objects information

viii) Methods/Operations Information
--------------------------------------------
Types of Objects in UFT

In UFT test automation we work with 4 types of Objects

i) Run-time objects

The objects present in the Application.

Software objects have different 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 one environment to another.
Ex:
Button in Standard windows environment -WinButton
Button in VB environment -VbButton
Button in Web environment -WebButton
---------------------------
Browser - Browser
Page-Page
Link-Link
---------------------
How to get Test object names:
Using Object Spy

Tools Menu-> Object Spy

How to get all test objects names in 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 change dynamically throughout the execution)
Using Regular expressions we can handle Dynamic objects.

c) Duplicate Objects (Two or more objects with same properties)
Using index property we can handle duplicate objects.
---------------------------------------
iii) Utility Objects

They are UFT reserved objects used for Testing and 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) 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 work with drives, Folders, files and Databases.

a) File System Object

It is used to work with Drives, Folders and 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 place for storing Test Objects information.

2 Types of Object Repository in UFT:

i) Local Object Repository (Internal file)

-> UFT Creates a Local repository for every action during Recording.

-> User(Tester) can edit Local objects(Add, Rename, Delete)

-> Local Repository file is internal file saves along with the Test.

-> UFT Maintains Local Object Repositories.
---------------------------------------

ii) Shared Object Repository(External file, extension .tsr)

0 comments:

Post a Comment