UFT Class 6 - Creating Tests in UFT


UFT Tutorial 6 - Creating Tests in UFT
a) Object Repository based Test Design

                1) Recording
                2) Keyword Driven Methodology

b) Descriptive Programming / Programmatic Descriptions

                1) Static Programming
                2) Dynamic Programming
-----------------------------------
Record and Run Tests

What is Test Recording?

It is a process of generating steps/statements for user actions on AUT and storing Objects information into Object Repository.
What is Test Run?

During Test execution UFT reads steps one by one and gets Objects information from Object
Repository, based on that info performs actions on AUT.

Recording Modes:

i) Normal Recording / Default Recording

It records user actions on AUT based on Objects.

It is the default Record mode in UFT.
-------------------
It is unable record continuous mouse operations.

ii) Analog Recording

It records user actions on AUT based on x, y coordinates of either desktop or Application window.

It also records Normal operations.
----------------------------------
Drawbacks


i) It requires more memory than Normal Recording

ii) It doesn't generate steps for every step, generates all actions in a track file, so
Test Script is not readable as well as editable.
----------------------------------------------
iii) Low Level Recording

It records some operations on Non supported environments (records based on object coordinates), also records normal steps.

Drawbacks
----------
i) It requires more memory than Normal Recording

ii) Test Script is nor readable
--------------------------------------
iv) Insight Recording

It records some operations on Non supported environments (it captures object screen shots also).
----------------------------
Advantages of Recording

Disadvantages of Recording
--------------------------------------
Pre-requisites to create Tests in UFT

i) Test Scenario:

Verify Login Functionality in GcrShop (http://www.gcrit.com/build3/admin/)
---------------------------------
ii) Steps / Navigation

i) Launch the Browser and navigate to http://www.gcrit.com/build3/admin/

ii) Enter user name

iii) Enter password

iv) Login Login button
----------------------------
iii) Verification Point/s

Check the existence of Logoff Link.
----------------------------------
iv) Input Data

User name: admin

Password: admin@123
------------------------------------
v) Error Handling

Capture Error message and Close the Browser.
-------------------------
vi) Add Comments

Test Objects Information

Test Methods
---------------------
Types of Objects in UFT

i) Run-time Objects


The Object present in the Application is called Run-time object.

States of Run-time objects

Enabled

Disabled

Visible

Hidden

Focused
--------------------
ii) Test Objects

Reference of Run-time object is Called Test object.

Constant Object

Dynamic Object

Duplicate Objects
----------------------
iii) Utility Objects

They are UFT Reserved objects used for Testing and Result Reporting.

SystemUtil

Windows based Application:

Syntax:

SystemUtil.Run "path of the application"

Example:

SystemUtil.Run "C:\Program Files\HP\Unified Functional Testing\samples\Flights Application\FlightsGUI.exe"

Web based Application:

Syntax:

SystemUtil.Run "path of the Browser", "url"

Example:

SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe", "www.icicibank.com"

iv) Automation Objects

Automation objects are User defined objects used to work with Drives, Folders, Files and Databases.

1) File System Object

2) Excel Application Object

3) Database Connection Object

4) Database Recordset Object

5) Dictionary object
etc...
--------------------------------------

No comments:

Post a Comment