UFT Tutorial for Beginners

UFT Tutorial for Beginners

Introduction to UFT tool: 

•    Unified Functional Testing (formerly QuickTest Professional) is a Functional and Regression Test Tool for Testing Windows based Client/ Server Applications, Web Applications and Mobile (Native and Hybrid) Applications.

•    UFT was developed in .NET technology and it is I-tier (Desktop) Application, doesn’t have any database.

•    UFT stores its resources (Shared object repository files, Function library files, Environment variable files etc…) using file format on Hard disk drive.

•    UFT has an Integrated VBScript engine to enhance Test scripts.

•    UFT has an Integrated MS Access Database engine for conducting data related operations.

•    UFT is an Object based Test tool, based on front-end objects it supports Testing operations.

•    UFT has two types of license, one is Seat License another is Concurrent License.

•    UFT works on MS Windows operating environment only. IT doesn’t  support UNIX operating environment.

Creating Tests / Tests in UFT:

UFT supports Two types of Test design,

i)    Object Repository based Test design (We can use Either Recording or Keyword driven methodology).

ii)    Descriptive Programming or Programmatic Descriptions (We can use either Static programming or Dynamic programming).

Types of Objects in UFT:

We work with Four types of objects in UFT,

i)    Run-Time Objects
ii)    Test Objects
iii)    Utility Objects
iv)    Automation Objects

Types of Steps or statements in UFT:

We use different types of steps/Statements to create Test scripts in UFT,

i)    Declarations (Variables and Constants)
ii)    Test object statements or Object calls
iii)    Utility object statements
iv)    Flow Control Statements
v)    Checkpoint statements
vi)    Action calls, Function calls etc…

Enhancing Tests:

We can enhance UFT Test scripts by,

i)    Inserting checkpoints
ii)    Inserting Transaction points
iii)    Inserting Output values
iv)    Inserting Flow control (Conditional and Loop) statements
v)    Parameterization
vi)    Synchronization
vii)    Using Regular expressions
viii)    Using Environment variables
ix)    Adding Comments
x)    Error Handling Etc…

Running and Debugging Tests:

Debugging Tests:

In UFT Debugging tests is optional, 

Whenever Test is not showing any errors and not providing correct Output then Debugging is required.

Using VBScript Debug commands and Breakpoints we can debug Test Scripts.

Running Tests:

We can run Single Test and Series of Tests.

Using  either “Test Batch Runner” Tool or AOM Script or ALM tool we can execute Series of Tests(Batch Testing).

Define Test Results:

Usually UFT provides Test Result for every test iteration if we use UFT tool features like Checkpoints, Output values, Transaction points etc…

If we use our own logic/VBscript features (Flow control statements etc…) then we need to define Test Results.

Manual Test Case:
Test Case Name:

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

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

Input Data

User name: admin

Password: admin@123

Expected Result:

Logoff Link existence in new page

Actual Result:

Test Result: 
UFT Test Script:

Object Repository based Test:

SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe", "http://www.gcrit.com/build3/admin/"
Browser("GCR Shop").Page("GCR Shop").WebEdit("username").Set "admin"
Browser("GCR Shop").Page("GCR Shop").WebEdit("password").SetSecure "567118ca08284845abbb47391bbd3c129776b0ebf7461878"
Browser("GCR Shop").Page("GCR Shop").WebButton("Login").Click
Browser("GCR Shop").Page("GCR Shop_2").Link("Logoff").Check CheckPoint("Logoff")

Descriptive Programming:

SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe", "http://www.gcrit.com/build3/admin/"
Browser("CreationTime:=0").Page("title:=GCR Shop").Webedit("name:=username").Set "admin"
Browser("CreationTime:=0").Page("title:=GCR Shop").Webedit("name:=password").SetSecure "5667a5518162f85e4cacb42801141a12b87c19162edf81ca"
Browser("CreationTime:=0").Page("title:=GCR Shop").WebButton("name:=Login").Click

If Browser("CreationTime:=0").Page("title:=GCR Shop_2").Link("Logoff").Exist(10) Then
Reporter.ReportEvent micPass, "Result", "Login Successful"
Reporter.ReportEvent micPass, "Result", "Login Failed"
End If

UFT 12.51 New Features

UFT Step by Step Tutorials (Videos) 



wow...its so helping...thanx.

Post a Comment