2. Agenda
• HP UFT Overview
• Advantages and Disadvantages of UFT
• HP UFT Installation steps
• UFT Components
• Record and Run feature
• Object Repository
• Data Tables and Parameterization
• Checkpoints
• Output Values
• Synchronization
• Actions and Functions
• VB Scripts basics
Classification: Restricted Page 2
3. HP UFT / QTP Introduction
• HPE Unified Functional Testing (UFT) software, formerly known as HP
QuickTest Professional (QTP), provides functional and regression test
automation for software applications and environments.
• Using UFT, QTP can automate user actions on a web or client based
computer application and test the same actions for different users,
different data set, on various Windows operating systems and/or different
browsers.
• Automation using UFT if planned and executed in a proper manner can save
considerable time and money.
• UFT is one of the most widely used automation testing tools in the market
today with over 60% market share.
• Basically, the UFT is a mixture of HP QTP (GUI testing tool) and HP Service
Test (API testing tool). Mixture of QTP and ST will be available on a single
graphic user interface. So from now onward, user does not have to
download two different tools while working.
Classification: Restricted Page 3
4. HP UFT / QTP Introduction
• Supported Browsers
• Internet Explorer 6, 7, 8, 9, 10, 11, Edge (with appropriate patches and service packs)
• Firefox 3.0.X, 3.5, 3.6 to 56 (with appropriate patches and service packs)
• Google Chrome till version 61 (with appropriate patches and service packs)
• Safari on Mac OS v6 – v9 (in Beta mode)
• Supported Operating Systems
• Windows 7 (SP1) , Windows 8/8.1 and Windows 10 including Surface support for
Windows 8.1 and Windows 10. UFT 12 onward supports Safari on Mac OS (in Beta
mode)
• As of September 2017, UFT does not support Linux OS. An Enhancement Request (ER)
is open for review on HP but there is no time line mentioned. If you have a valid SAID
ID you can view the request here.
• Unified Functional Testing comes pre-installed with 4 add ins by default – ActiveX, Visual
Basic, Web and Mobile. All-in-all UFT supports .Net, Web, VB, Mobile, Java, Oracle apps,
SAP, PeopleSoft, Siebel, Stingray, Terminal Emulators (Unix, Mainframes), Power Builder,
Delphi, Visual Age, Web Services, Flex (By Adobe), Shunra VE Desktop Professional for
WAN emulation (By Shunra)
Classification: Restricted Page 4
5. HP UFT / QTP Version
Astra
Quick Test
v1.0 to
v5.5 (May
1998 to
Aug 2001)
QuickTest
Professional
v6.5 to v9.0
(Sep 2003 to
Apr 2006)
Hp-QuickTest
Professional
v9.1 to v11.0
(Feb 2007 to
Sep 2010)
Hp-Unified
Functional
Testing v11.5 to
v11.53 (2012 to
Nov 2013)
Testing v12.0
to v12.51
(2014 to Nov
2016)
HP UFT
version
14.0.1
(2017)
Hp-Unified
Functional
Classification: Restricted Page 5
6. HP UFT / QTP Facts
Advantages:
1)Developing automated tests using VBScript does not require
a highly skilled coder and is relatively easy when compared to
other object oriented programming languages.
2)Easy to use, ease of navigation, results validation, and Report
generation.
3)Readily Integrated with Test Management Tool (Hp-Quality
Center) which enables easy scheduling and monitoring.
4) Can also be used for Mobile Application Testing.
5)As its licensed by HP, full support is provided by HP and by
its forums for addressing technical issues.
Classification: Restricted Page 6
Disadvantages:
1) Unlike Selenium, QTP works in Windows operating system only.
2)Not all versions of Browsers are supported and the testers need to wait
for the patch to be released for each one of the major versions.
3) The licensing cost is very high.
4)Even though scripting time is less, the execution time is relatively
higher as it puts load on the CPU & RAM
7. HP UFT / QTP Installation
Step 1:- Click on URL https://software.microfocus.com/en-us/software/uft
Step 2:- Click On “Free trial "button
Classification: Restricted Page 7
8. HP UFT / QTP Installation
Step 3:- Fill in the Personal details and click Next.
Classification: Restricted Page 8
9. HP UFT / QTP Installation
Step 4:- Read the ‘Terms of Use’ and click “I Agree”.
Step 5:- An email will be triggered with account activation link. Click on the Confirm
Email.
Step 6:- Once account is activated login using your credentials. Click on the Download
Button
Classification: Restricted Page 9
10. HP UFT / QTP Installation
Step 7:- It will direct to the download page. Click on any of the links circled in Red
below. The setup file will be downloaded to download folder.
Classification: Restricted Page 10
11. HP UFT / QTP Installation
Step 7:- Double click on the Setup.exe and follow the steps.
Step 8:- Click Next
Step 9:- Files will start extracting.
Classification: Restricted Page 11
12. HP UFT / QTP Installation
Step 10:- Click Ok. It will automatically install missing programs.
Step 11:- Read and click on agree the terms and conditions.
Classification: Restricted Page 12
13. HP UFT / QTP Installation
Step 12:- In the Custom Set up Window, select the plugins that are required for your
automation i.e. you should select the plugins based on the technology of your
application under test. For Example, if your application is based on .NET then you
should ensure that you select .NET.
Classification: Restricted Page 13
14. HP UFT / QTP Installation
Step 13:- Click on Install.
Step 14:- Click on Finish.
Classification: Restricted Page 14
15. HP UFT / QTP Launch and Add-In
Step 1:- After Installation, application
can be launched from the Start Menu
as shown in the figure.
Step 2:- The Add-in dialog Manager
opens
Classification: Restricted Page 15
16. HP UFT / QTP Launch and Add-In
Step 3:- The Start Page describes the new features in the current
release-including links to more information about these features. It
also provides links to Process Guidance, a tool that offers best
practices for working with QTP. You can open a document from the list
of Recently Used Files, or you can click the buttons in the Welcome!
area to open new or existing documents.
Classification: Restricted Page 16
17. HP UFT / QTP Components of IDE
1) Solution Explorer:- The Solution Explorer is an hierarchical tree of all actions and
tests in the current test, with their references, events and flows. Action tab gives
details of test code.
2) Data Tab:- The Data pane shows the data related to the test or component, or
business process testing flow. It displays the data in spreadsheet table with numbers of
columns and rows which will be helpful in parameterizing that data.
Classification: Restricted Page 17
18. HP UFT / QTP Components of IDE
3) Active Screen Pane:- The Active Screen offers a snapshot of that particular
application under test on which some action has been performed during the recording
session. Also, the Active Screen page contains detailed property information about
each object as like the original page displays.
4) Errors Pane:- The Errors pane displays errors comes because of test like; missing
resources and coding syntax errors. Detected errors automatically display in the Errors
pane, if it is not opened too. To know the source of the error, just double-click on the
error to see the particular error belongs to which data, component, or path.
Classification: Restricted Page 18
19. HP UFT / QTP Components of IDE
5) Properties Pane:- The Properties pane displays properties of a test, action,
component, function library, or application area and facilitates user to change the
properties and parameters too. The information that displays in this pane is totally
depends on the active document.
6) Tasks Pane:- Using this pane, user can create, view, and manage the TODO tasks. A
TODO task can be anything that should be completed during a test or component, such
as giving information applicable for handing over a testing document, or adding a
reminder to you to add steps that test a new page in an application. TODO tasks can be
saved with the test or component. It also facilitates to see the TODO comments that be
in an action, an open function library, or an open user code file.
Classification: Restricted Page 19
20. HP UFT / QTP Components of IDE
7) Toolbox Pane:- In case of GUI testing, the
Toolbox pane contains all the keywords and
functions of a test or component, facilitates
user to drag and drop objects or calls to
functions into a test or component. While
dragging and dropping an object into a test or
component, UFT adds a step with the default
operation for that object.
8) Search Pane:- The Search Results pane shows the result, performed by search
options from Search menu, facilitates user to browse the results of the search, locate a
specific result, and perform recent searches in order to receive updated results.
Classification: Restricted Page 20
21. HP UFT / QTP Components of IDE
9)Expert View:- In the Expert View , each line represents a Test Step in VB Script. The Operation
performed on the object is always displayed at the end of the statement
Dialog("Login").WinEdit("Agent Name:").Set “John“
Syntax for a statement in expert view is GUI object on which the operation is performed along with its
complete hierarchy followed by the Operation on the Object and value associated with that Operation
ParentObject(Name).ChildObject1(Name)...ChildObjectN(Name).Operation
10)Keyword view:- The Keyword View is comprised of a table-like view where each step is a separate
row in the table and each column represents different parts of the steps.
• Item Column contains the item on which you want to perform the step. This column uses icons
displays the hierarchy of the GUI object on which operation is performed
• Operation Column contains the operation to be performed on the item.
• Value Column contains the argument values for the selected operation,
• QTP automatically documents each step for easy understanding in the Documentation Column
• These 4 columns are default but you can also use assignment & comment columns in Keyword View
Classification: Restricted Page 21
22. Record and Run Feature
• Record and playback is a feature available in QTP/UFT which automatically generates the
scripts by recording/observing the user actions on the test application and this generated
script can be played back.
• Record and Playback gives an idea whether the tool can support the technology or NOT (initial
settings should be correct).
• Used to create a test a basic functionality of an application or feature that does not require
long-term maintenance.
• It can be used for recording both mouse movements and keyboard inputs. I.e. By recording a
test, you can replicate various user actions.
• Can be used to automate basic test cases.
Classification: Restricted Page 22
23. Record and Run Feature Steps
Step1:- Go to the Start Page and click ‘New’ test
Step2:- A new test window opens. You need to select the test type. Here, select ‘GUI Test’ and fill
the below fields with name and location
Classification: Restricted Page 23
24. Record and Run Feature Steps
Step3:- The new test screen will pop up once it is created. You will see a tab that is created with 1
action by default. Click on Action1 tab
Step4:- Click ‘Record’ and select ‘Record and Run Settings’ as shown below
Classification: Restricted Page 24
25. Record and Run Feature Steps
Step5:- From the Record and Run
Settings dialog box, you can select
applications based on Web or
Windows. If you have other add – in
like SAP the corresponding tab will
appear.
Step6:- Click on the Web tab and
enter the URL of the AUT , if want to
record the events on web pages.
Classification: Restricted Page 25
26. Record and Run Feature Steps
Step7:- If you want to test the windows
based application click on “Windows
Applications” tab and select the path for the
application as shown below. Click Apply.
Step8:- Once OK button is pressed the
windows application will automatically will
open and you can see the recording toolbar
Re
cor
din
g
Mo
de
s
Classification: Restricted Page 26
27. Record and Run Feature Steps
Step9:- Start performing actions,
upon completion of the steps click
"Stop" button in the record panel.
the script will be generated
Step10:- Now, playback the script by
clicking on the playback button. The
Script replays and result is displayed.
Classification: Restricted Page 27
28. Record and Run Feature Steps
Step9:- Analyse the results window for Pass and Fail summary
Modes of Recording
Normal Recording − This is the default Recording mode that records the objects and the operations
performed on the application under test.
Analog Recording − This records not only the keyboard actions but also the mouse movements
relative to the screen or the application window.
Low-Level Recording − This records the exact co-ordinates of the objects independent of the fact
whether UFT recognizes the object or NOT. It just records the co-ordinates, hence does NOT record
mouse movements.
Insight Recording − UFT records operations, based on its appearance and not based on its native
properties.
Classification: Restricted Page 28
29. Object Repository
Object Repository :- Object Repository is a collection of object and properties with which UFT will be
able to recognize the objects and act on it. When a user records a test, the objects and its properties
are captured by default. Without understanding objects and its properties, UFT will NOT be able to
play back the scripts.
Classification: Restricted Page 29
30. Object Repository
Object Repository :- Object Repository is a collection of object and properties with which UFT will be
able to recognize the objects and act on it. When a user records a test, the objects and its properties
are captured by default. Without understanding objects and its properties, UFT will NOT be able to
play back the scripts.
Test
Design
Test
Execution
Record/ Learn
Test Objects
Real Time
Objects
Replay/
Execution
Object Properties
Match i.e Object
identification
Classification: Restricted Page 30
31. Object Repository
Object Repository Types:-
• Local object repositories: As soon as you create
a new action in UFT, a corresponding object
repository is created along with it. This repository
is known as local object repository. Any objects
that are recorded in this repository are only
available for the corresponding action and are not
available for other actions in a test.
Local object repository is present inside the
corresponding action folder and always have the
name ObjectRepository.bdb
• Shared object repositories: A shared object
repository is an object repository that exists
independently of an individual test or action. As
the name suggests, the test objects present inside
shared object repositories can be used by multiple
tests or actions. Shared object repositories can be
managed using Object Repository manager.
Shared object repository can have any user
defined name with an extension tsr.
Test
Objects
Properties of
Selected Object
Logical Name
Classification: Restricted Page 31
32. Actions in Object Repository
New User Defined Objects:-
1. Select the Object Repository Manager
2. Object Repository Manager dialog box will open
3. Click on New Object Icon
4. Select the type of Object in Class field, give a name to the object and click OK.
5. New object gets added in the local repository
Classification: Restricted Page 32
33. Actions in Object Repository
Add Objects:-
1. Select the Object Repository Manager
2. Object Repository Manager dialog box will open
3. Click on Add Object Icon
4. UFT gets minimized and when you click on the object you wish to add in AUT, the third dialog
shows up and you can add the object.
Classification: Restricted Page 33
34. Actions in Object Repository
Navigate and Learn Objects:-
1. Select the Object Repository Manager
2. Object Repository Manager dialog box will open
3. Click on Add Object Icon
4. UFT gets minimized and click on the AUT title bar, the third dialog shows up and you can add the
objects from the complete displayed screen.
Classification: Restricted Page 34
35. Actions in Object Repository
Highlight in application:- To Highlight an object or window.
1. Open the Object repository of the Script.
2. Select the object which has to be Highlighted. Ensure that the page is open where the object is
present
3. Click on “Highlight In Application” Icon
4. The object will Blink .
Classification: Restricted Page 35
36. Actions in Object Repository
Locate in Repository:- This is an useful feature when a group of people are working on the scripts.
Using this button you can identify if an object is available in the object repository.
1. Click on Locate in repository Button or click View->Locate in repository.
2. Object selection window will appear. Select the object and click ok.
3. If the object is available in the Object repository then the object will be highlighted. You will get
pop- up if the object is not present.
Classification: Restricted Page 36
37. Actions in Object Repository
Object Spy:- Object spy is used to identify the properties, their corresponding values & the methods
associated with a given object. This can be used for even adding objects to Object repository.
1. Clicking the Object Spy icon, the Object Spy Dialog box opens.
2. The Objects can be added to the repository on clicking the pointing hand.
Classification: Restricted Page 37
38. Actions in Object Repository
3. Object selection window will appear. Select the object and click ok. The properties of the object can
be seen in the Object Spy window
4. Click On Add Object To repository icon to add the selected object to repository. And click Close.
Classification: Restricted Page 38
39. 5. The properties of the objects are added and name of the object gets updated. Click on Close button
the object gets added in the Action Object repository
Actions in Object Repository
Classification: Restricted Page 39
40. Actions in Object Repository
Details of Object spy window.
Classification: Restricted Page 40
41. Add Insight Objects:- Insight identifies objects based on what they look like, instead of using the
object properties which are part of the application/object design.
1. In order to define an Insight Object in UFT you will have to open the Object Repository Manager.
2. Select the “Add Insight Object” button or from the select from the "Object" menu --> “Add
Insight Object” in the Object repository manager window.
3. The Select Learn Mode window will appear. UFT’s Insight offers two modes:
• Automatic - Enables UFT to automatically select the region/object as the Insight object
• Manual - Specify the region/object to use as the Insight object and customize it
Actions in Object Repository
Classification: Restricted Page 41
42. 4. After selecting the Manual mode, select the area of the object. You will be able to
change this area in the next screen. For this example, MyFlight logo area is
selected.
Actions in Object Repository
Classification: Restricted Page 42
43. Actions in Object Repository
5. In the "Add Insight Test Object" window continue defining the Insight object.
6. Once the defining the Insight Test object, is done make sure to press the save button. The new
object of type Insight is added to the object repository.
Classification: Restricted Page 43
44. Actions in Object Repository
Object Repository Comparison:- Enables to compare existing assets from two different object
repositories using the Object Repository Comparison Tool. The tool is accessible from the Object
Repository Manager, and enables to compare different object repository resources, or different
versions of the same object repository resource, and identify similarities, variations, or changes.
1. Navigate to "Resources" >> "Object Repository Manager"
2. Go to "Tools" >> "Object Repository Comparison Tool“
3. The Object Repository comparison Window opens and select the two Object Repository files to be
compared.
Classification: Restricted Page 44
45. Actions in Object Repository
4. It performs the comparison and displays the differences one by one .
5. It can be filtered based on three parameters viz - unique objects, identical objects, partial match
objects.
Classification: Restricted Page 45
46. Actions in Object Repository
Object Repository Merge Tool:- There can be circumstances when Object repository needs to be
merged, as maintaining two or more object repositories become additional overheads.
1. Navigate to "Resources" >> "Object Repository Manager“
2. Go to "Tools" >> "Object Repository Merge Tool“
3. The Object Repository Merge window opens and select the two Object Repository files to be
merged.
Classification: Restricted Page 46
47. Actions in Object Repository
4. After merging, the statistics are shown.
5. It can be filtered based on two parameters viz - show all objects, show only conflicting objects.
C
w
las
w
sifw
icat
.im
on:iR
n
es
d
trs
icm
tedapped.com Page 47