QTP
Transcript of QTP
Do you know QTP!Do you know QTP!
Prepared By : Sreelesh Kunnath
What is Automation-What is Automation-
Test Automation is the use of software to control the execution of tests & the comparison of results- actual with the predicted/expected.
A software program that is used to test another software program, this is referred to as Automated software testing.
A third party tool is used to test the application.
Use of automation tools reduces the test time as well as the cost.
Saturday, April 8, 2023
Sreelesh Kunnath 2
Why Automation-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.
Saturday, April 8, 2023
Sreelesh Kunnath 3
Benefits of Test Automation-Benefits of Test Automation-
. Allows more testing to be done
. Strengthen Test Cycle
. Testing is Consistent, repeatable
. Useful when new patches released
. Makes configuration testing easier
. Test battery can be continuously improved
Saturday, April 8, 2023
Sreelesh Kunnath 4
False Benefits-False Benefits-
. Fewer tests will be needed
. It will be easier if it is automated
. Compensate for poor design
. No more Manual Testing
Saturday, April 8, 2023
Sreelesh Kunnath 5
What are the different tools available in the What are the different tools available in the market (for functional testing)-market (for functional testing)-
. Rational Robot
. Win Runner
. QTP
. Silk Test
. QA Run
. Web FT
Saturday, April 8, 2023
Sreelesh Kunnath 6
Life Cycle Of Automation-Life Cycle Of Automation-
Analyze the Application
Select The Tool
Identify the session
Design/ Record Test Scripts
Run the test scripts
Finding & Reporting the defects
Saturday, April 8, 2023
Sreelesh Kunnath 7
What is the diff. between WR & QTP-What is the diff. between WR & QTP-
QTP Win Runner 7.0
Developed by MI Now HP Developed by MI
Functionality testing on windows & web based applications
Functionality testing on windows based application
It Supports .NET Technology Does not support .NET Technology
Scripting language is VB-Script Scripting language is TSL
Active Screen Available in QTP Not Available
QTP has data table to store script values Not available
QTP supports Multimedia, Main Frames, XML, J2EE
It won’t support
It supports ERP such as SAP, Siebel 7.0, people Soft 8.8
But WR supports Siebel 6.0, people soft 6.0
Saturday, April 8, 2023 Sreelesh Kunnath 8
Introduction to QTP -Introduction to QTP -
. Developed by Mercury interactive But Now by HP
. Developed for web functionality
.QTP supports both web applications & windows applications
. QTP Developed in 2002
. Test Script developed on VB Script
. QTP supports Languages is .NET. J2EE, Main Frame, XML,Java
ERP -> SAP, Seibel, People soft
. QTP Supports both Technical & Non Technical People
. QTP run on only windows platform not supporting UNIX, Linux etc
Saturday, April 8, 2023
Sreelesh Kunnath 9
Versions of QTP -Versions of QTP -
QTP 5.5 2002 5.6 6.0 Industry started from this version 6.5
8.0 Rapidly working on(8.0,,9.0) 9.0 9.2
10 Current Version
Saturday, April 8, 2023
Sreelesh Kunnath 10
Environment needs for QTP -Environment needs for QTP -
System Requirement : IBM-PC (or) Equivalent to P3
Hardware Drive : 250MB of Free Memory space
RAM : 256MB of RAMOS : M/S windows 2000 server with 3-4 service
pack M/S windows XP with 1-2 SP
M/S windows 2003 with no service pack
Web Browser : MS Internet Explorer 5.5 Netscape Navigator 6.11, 6.22, 6.23, 7.02,
7.1 AOL 8.0, 9.0
Saturday, April 8, 2023
Sreelesh Kunnath 11
Overview of QTPOverview of QTP - -
1) Testing Process of QTP 2) Windows Structure of QTP3) Add Ins of QTP4) Architecture of QTP5) Execution process in QTP6) Development of Automation Test7) Recording Modes in QTP8) Object Repository9) Object Spy10) Transaction11) Virtual Object12) Check Points13) Actions14) Exception Handling15) Object identification16) Ordinal Identifier17) Smart Identification
Saturday, April 8, 2023
Sreelesh Kunnath 12
Overview of QTP Overview of QTP --
1) Output Values2) Synchronization point3) QTP Run Modes4) Regular Expressions5) Descriptive Programming6) Environment Variables7) VB-Script8) Hoe to work with Functions9) Associated Library
Saturday, April 8, 2023
Sreelesh Kunnath 13
Testing Process of QTP -Testing Process of QTP -
1) Record & Run Settings
2) Develop Automation Testing
3) Enhance/ Customize Automation test
4) Debug Automation Test
5) Execute Automation Test
6) Analyze Test Results
7) Report defects in bug tracking tool
Saturday, April 8, 2023
Sreelesh Kunnath 14
Window Structure of QTP -Window Structure of QTP -
1) Test Pane2) Active Screen3) Data Table4) Debug Viewer
Saturday, April 8, 2023
Sreelesh Kunnath 15
Add Ins of QTP -Add Ins of QTP -
It gives information about the technology supported by the QTPBy default three Add Ins are there in QTP
1) ActiveX2) VB3) Web
Additional Add ins: 1) Java
2) Oracle 3) People soft4) .NET5) Terminal Emulator6) SAP7) Siebel
Saturday, April 8, 2023
Sreelesh Kunnath 16
Add In ManagerAdd In Manager
Saturday, April 8, 2023
Sreelesh Kunnath 17
Architecture Of QTP -Architecture Of QTP -
1) Execution Process in QTP2) Development of Automation Test
1) Recording2) Writing3) Function Generator
Saturday, April 8, 2023
Sreelesh Kunnath 18
Recording Modes of QTP -Recording Modes of QTP -
There are three recording modes in QTP -
1)Normal Recording Mode
2) Analog Recording Mode
3) Low Level Recording Mode
Saturday, April 8, 2023
Sreelesh Kunnath 19
Record a TestRecord a Test
Saturday, April 8, 2023
Sreelesh Kunnath 20
Record & Run Settings-Record & Run Settings-
Saturday, April 8, 2023
Sreelesh Kunnath 21
Run a Test and Save Results-Run a Test and Save Results-
Saturday, April 8, 2023
Sreelesh Kunnath 22
View Test Results-View Test Results-
Saturday, April 8, 2023
Sreelesh Kunnath 23
Object Repository-Object Repository-
Object Repository is nothing but a storage location. It contains the collection logical name and physical description of a particular object.
Logical Name: For Naming ConventionPhysical Description : is Nothing but expected physical
propertiesTwo types of Object Repositories are available in QTP-
1) Per Action (.mtr)2) Shared Object Repository (.tsr)
Saturday, April 8, 2023
Sreelesh Kunnath 24
Open the Object Repository Dialog Box-Open the Object Repository Dialog Box-
Saturday, April 8, 2023
Sreelesh Kunnath 25
Object Spy-Object Spy-
Object spy is used to display or view all the physical properties and methods of an object or a window based on the requirement.
Example: If window(“Login”). Exists Then Msgbox(“Pass”) else Msgbox(“Fail”)
End If
Saturday, April 8, 2023
Sreelesh Kunnath 26
Virtual Object-Virtual Object-
Virtual Object is used to identify the properties of similar objects in a particular Area.
Example: In normal recording if we select the paint brush window, the script will look like this-
window(“Paint”).Activate
Window(“Paint”).Winobject(“colors”).Click 72,16 Window(“Paint”).Winobject(“colors”).Click 80,14 window(“Paint”).Close
If we are using Virtual object, the script will look like this- window(“Paint”).Activate
Window(“Paint”).Winobject(“colors”).Virtual Button(“RED”) Window(“Paint”).Winobject(“colors”).Virtual Button(“BLUE”) window(“Paint”).Close
Saturday, April 8, 2023
Sreelesh Kunnath 27
Check Points-Check Points-
Check Point is a verification point that compares the current value of the specified property with the expected value for that property.
There are 9 types of check points are available in QTP.They are-
1) Standard Check Point2) Text/ Text Area Check Point3) Bitmap Check point4) Database Check Point5) Table Check Point6) Page Check Point7) XML Check Point8) Image Check Point9) Accessibility Check Point
Saturday, April 8, 2023
Sreelesh Kunnath 28
Saturday, April 8, 2023
Sreelesh Kunnath 29
CheckpointCheckpoint TypesTypes
Inserting a Checkpoint During Recording-Inserting a Checkpoint During Recording-
Saturday, April 8, 2023
Sreelesh Kunnath 30
Insert a Checkpoint After Recording-Insert a Checkpoint After Recording-
Saturday, April 8, 2023
Sreelesh Kunnath 31
Identifying a Failed Checkpoint-Identifying a Failed Checkpoint-
Saturday, April 8, 2023
Sreelesh Kunnath 32
Actions-Actions-
Action is nothing but a logical portion to entire script file based on the requirement. Each and every action should have meaningful result.
Types of Actions:1) Regular (By default)2) Reusable3) External
How to work with Actions:1) Call to copy of Action2) Call to Existing Action
Saturday, April 8, 2023
Sreelesh Kunnath 33
Data Driven Test-Data Driven Test-
Testing the same application with multiple sets of data.How to use parameterization:Ex:
Before parameterization Dialog(“Login”).Activate
Dialog(“Login”).WinEdit(“name”).Set ”Axis”Dialog(“Login”).WinEdit(“Password).SetSecure”axisitt”Dialog”Login”.Close
After Parameterization Dialog(“Login”).Activate
Dialog(“Login”).WinEdit(“Login name”).Set DataTable(”name”, dtglobalsheet)
Dialog(“Login”).WinEdit(“Password). (”password”, dtglobalsheet) Dialog”Login”.Close
Saturday, April 8, 2023
Sreelesh Kunnath 34
Using Data Sheet (Global, Local & Location)-Using Data Sheet (Global, Local & Location)-
Saturday, April 8, 2023
Sreelesh Kunnath 35
Setting the Parameter Value-Setting the Parameter Value-
Saturday, April 8, 2023
Sreelesh Kunnath 36
Test Results Iterations-Test Results Iterations-
Saturday, April 8, 2023
Sreelesh Kunnath 37
Exception Handling-Exception Handling-
It enables Quick test to detect and handle when
unexpected error occurred during execution time.
Types of Exception Handling:
1) Popup Exception Handling
2) Object State Exception Handling
3) Test Run Exception Handling
4) Application Crash
Saturday, April 8, 2023
Sreelesh Kunnath 38
Object Identification-Object Identification-
By using object identification we can map “customer user defined object” to “standard Class”.
Two types of properties are their in object Identification:
1) Mandatory Properties2) Assistive properties
Saturday, April 8, 2023
Sreelesh Kunnath 39
Ordinal Identifier-Ordinal Identifier-
By using ordinal identifier options quick test able to identify an
object under ordinal identifier.
Three Components are available in ordinal identifier
1) Index2) Location3) Creation time
Saturday, April 8, 2023
Sreelesh Kunnath 40
Smart Identification-Smart Identification-
Quick test unable to identify the object, it is change
randomly. To identify such object we need to use Smart Identification.
Two properties are available in Smart identification
They are-1) Base Filter Properties2) Optional Filter Properties
Saturday, April 8, 2023
Sreelesh Kunnath 41
Synchronization Point-Synchronization Point-
Synchronization point maintains the time coordination between testing process and your application process.
There are 4 types of synchronization points:1) Sync2) Wait, wait(5) or wait 53) Wait Property4) Exist
Saturday, April 8, 2023
Sreelesh Kunnath 42
QTP Test Run Modes-QTP Test Run Modes-
In QTP, we have 2 types of run modes-
1) Normal
2) Fast
Saturday, April 8, 2023
Sreelesh Kunnath 43
Regular Expressions-Regular Expressions-
It enables quick test to identify test string with varying
value (varying means changing) Regular Expressions can be used in the following areas:
1) Check Points
2) In parameterization
3) Data Driven test
4) Actions
5) Exception Handling….etc
Saturday, April 8, 2023
Sreelesh Kunnath 44
Using a Regular Expression-Using a Regular Expression-
Saturday, April 8, 2023
Sreelesh Kunnath 45
Some Regular Expressions-Some Regular Expressions-
Expression Char Description
Period . Matches any single character
Asterisk * Matches zero to any number of occurrences of the preceding character
Plus + Matches one to any number of occurrences of the preceding character
Brackets [A-Z][a-z] Matches a range of characters
[0-9] Matches a range of numbers
\w Matches any alphanumeric character including underscore
\W Matches any non-alphanumeric character
Digit \d Matches any digit
\d{4} Matches exactly four digits
Saturday, April 8, 2023 Sreelesh Kunnath 46
Descriptive Programming-Descriptive Programming-
Without using the object repository test engineer can develop automation test in this particular accept, we need to use a technique called as descriptive programming.
Script: Dialog(“test:=Login”).Activate
Dialog(“text;=Login”).wineidt(“attached text:= Login name”). Set “Axisitt” Dialog(“text:=Login”).wineidt(“attached text:= Password”). Set “88888” . Dialog(“text:=Login”).Close
Saturday, April 8, 2023
Sreelesh Kunnath 47
How to work with Environmental variables-How to work with Environmental variables-
it is a special type of variable which is use to expose the data related to environment.
Environment Variables
Built In user defined
Internal External
Saturday, April 8, 2023
Sreelesh Kunnath 48
VB Script
Associated library
How to work with methods
How to work with functions
Back End testing
How to work with Win Runner
How to connect Quality centerSaturday, April 8, 2023
Sreelesh Kunnath 49
Best Practice and tipsBest Practice and tips
Comments & Queries-Comments & Queries-
Queries are always welcome.
Saturday, April 8, 2023
Sreelesh Kunnath 50
Feedback-Feedback-
-Please spend few minutes from your
valuable time to provide your feedback.
-if helpful please mail [email protected] any query please mail [email protected]
Thanks & Happy Automation futureThanks & Happy Automation future
Saturday, April 8, 2023
Sreelesh Kunnath 51