Professional Documents
Culture Documents
QTP (Quick Test Professional) : Presented By: Ritu Goyal 1 Sept 2010
QTP (Quick Test Professional) : Presented By: Ritu Goyal 1 Sept 2010
Professional)
Presented By:
Ritu Goyal
1st Sept 2010
Session Objectives
Introduction to Automation
Why Automation
Benefits of Automated Testing
Automated Testing Process
Introduction to QTP and its Salient Features
Add-Ins
Environment Supported
Object Repository
Object Identification / Object Spy
Check Points
Parametrization
Frameworks
What is Automation
A software program that is used to test
another software program, this is referred to
as Automated software testing.
Test Automation is the use of software to
control the execution of tests & the
comparison of results-> actual with the
predicted/expected.
A third party tool is used to test the
application.
Use of automation tools reduces the test time
as well as the cost
Why Automation
Avoid the errors that human make when they
get tired after multiple repetitions.
The test program wont skip any test by
mistakes.
Each feature test cycle will take less time &
Required less human intervention.
Required for Easy cycle of Regression Testing.
Benefits of Test Automation
Allows more testing to be done.
Strengthen Test Cycle.
Which Test Cases to Automate?
Tests that need to be run for every build of the
application (sanity check, regression test)
Tests that use multiple data values for the
same actions (data driven tests)
Which Test Cases Not to Automate?
Usability testing
"How easy is the application to use?"
One-time testing
"ASAP" testing
"We need to test NOW!"
Ad hoc/random testing
based on intuition and knowledge of application
What are the different tools available in the
market (for functional testing)
Rational Robot
Win Runner
QTP
Silk Test
QA Run
Version History of QuickTest
Professional
Astra QuickTest (Mother tool of QTP) 1.0 to 5.0
6.5 – 2003
8.0 – 2004
9.0,9.1-2006
Contd….
After running a test QTP displays the results in
a tree structure and in clear visual reports
Scripting Language is VBScript which is easy
to use , understand and program even
complex functionalities with ease.
Library files contains VBScript functions and
subroutines that can be added to the test.
Add-Ins
Default
ActiveX
Visual Basic
Web
Additional
Java
Oracle
PeopleSoft
.NET
Terminal Emulator
Sap, Siebel & Web services
Add-In Manager
Environments Supported
Browsers
Netscape
Internet Explorer
AOL
Operating Systems
Windows XP/2003
Windows 2000
Windows 98
Windows NT
Windows ME
WHAT TYPE OF TOOL IS QTP
Reporting defects
Record User Actions
Start recording on Any Web site. Choose Test > Record or click the
The test can be saved into a Windows file system (as below).
If TestDirector is available and connected with QTP, the test can be
saved there.
QTP creates an entire structure of files and directories to support a
single QuickTest script for each saved test.
Verify Successful Playback
Use the ‘Run’ button to begin playback from the top of the test.
Select the location of the test results- either a new results folder or
a temporary folder.
Viewing the Test Results
XML Checkpoint
Checks the data content
of XML documents in
the application.
When to Use Checkpoints
Before creating checkpoints on web objects
we have to select web-test option in ADD-IN
Manager.
If the objects developed in HTML we can use
Standard Check point.
If the Objects developed in XML we can use
XML Check point.
How Checkpoints Work - Playback
Script
Expected Result
Te st
Re sults Actual = e xpe cte d ?
PASS
How to Add a Checkpoint… set
expected value
»Do no t auto matically se le c t
the pre de fine d list o f
pro pe rtie s to c he ck.
»Sc ro ll do wn the pro pe rty list
to find the pro pe rty( o r
pro pe rtie s) that be st me e ts
the te st re quire me nt.
Table Checkpoint
Database Checkpoint
Choose Insert > Checkpoint > Database
Checkpoint. The Database Query Wizard opens.
Database Checkpoint ..contd
How to Add a Checkpoint… Test Result
PARAMETRIZATION
Parameterization - Passing multiple set of
values for testing
A parameter is a variable that is assigned a
value from an external data source at run
time. We use parameterization when we
want to change the value of properties at
run time.
HOW CAN WE PARAMETRIZE?
Identify the fixed value that needs to be
parametrized
Replace with parameter
Test
Settings
frame.
Environment variable
Parameters
The Environment variables can have Quick
Test generated values or values supplied
from external files.
Test
Settings
Environment
»Se le c t the ste p in the Tre e Vie w that c o ntains the re co rde d input value .
»Click o n the text unde r Value c o lumn.
How to Parameterize an Input Value…
contd.
Se le c t the so urce fo r paramte rizatio n
Se le c t the parame te r name .
Se le c t the data she e t to use .
How to Parameterize an Input Value…
contd
Actions
A test is composed of actions or logical
sections. The steps we add to the test are
added within the test’s actions. By default,
each test begins with a single action.
When we run a test with multiple actions, the
Test Results are divided by actions so that
we can view the detailed results for each
action individually.
Each action has its own sheet in the Data
Table so that we can insert data that applies
only to that action.
TYPES OF ACTIONS
Non-re-usable: Action can be used in the local
test, only once.
Reusable: Action can be used in the local test,
multiple times.
External: These are reusable actions created
in another test. This can be of two types. If a
call to an external action is used the action
is read only in the calling test. But, any
existing action can be inserted as a copy of
the original action. In this case, we can
modify this copy of the external action in the
calling test.
CALLING ACTION
INSERT CALL TO EXISITING ACTION –
CALLS A REUSABLE ACTION, BUT ANY
CHANGES WILL BE REFLECTED ON
ORIGINAL CALLED ACTION
INSERT CALL TO COPY OF ACTION –
CALLS A REUSABLE ACTION, BUT
CHANGES ARE NOT REFLECTED ON
ORIGINAL CALLED ACTION
How to set an Action as Reusable
How to Call a Reusable Action
FRAMEWORKS
Linear framework – Recording,
Enhancement , Playback
Here U create scenarios, Do recording
based on scenarios, enhancement is
done for verifications, and playback
for execution
FRAMEWORK
Data driven – Here an external database is
maintained for passing values to the actions
in qtp
Values are completely passed only thro this
data sets
FRAMEWORK
Keyword driven – using the manually entered
table that defines test object, operation,
data and description, VB scripts are
automatically generated by QTP.
FRAMEWORKS
Functional/modular – Here the actions are
declared as user defined functions
These functions are called wherever needed.
FRAMEWORK
Hybrid framework – mix of any of the above
frame works are classed as hybrid.
Depending on complexity of the application,
mixes are chosen.
Thanks You