4699901-qtp-ppt(3)
-
Upload
priyanka-sahni -
Category
Documents
-
view
218 -
download
0
Transcript of 4699901-qtp-ppt(3)
-
7/27/2019 4699901-qtp-ppt(3)
1/50
QTP
Prepared ByAshish Kumar Srivastava
-
7/27/2019 4699901-qtp-ppt(3)
2/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 2
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 isreferred 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.
-
7/27/2019 4699901-qtp-ppt(3)
3/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 3
Why Automation-
. Avoid the errors that human make when they get tiredafter multiple repetitions.
. The test program wont skip any test by mistakes.
. Each feature test cycle will take less time & Required lesshuman intervention.
. Required for Easy cycle of Regression Testing.
-
7/27/2019 4699901-qtp-ppt(3)
4/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 4
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
-
7/27/2019 4699901-qtp-ppt(3)
5/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 5
False Benefits-
. Fewer tests will be needed
. It will be easier if it is automated
. Compensate for poor design
. No more Manual Testing
-
7/27/2019 4699901-qtp-ppt(3)
6/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 6
What are the different tools available in the market (forfunctional testing)-
. Rational Robot
. Win Runner
. QTP
. Silk Test
. QA Run
. Web FT
-
7/27/2019 4699901-qtp-ppt(3)
7/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 7
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
-
7/27/2019 4699901-qtp-ppt(3)
8/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 8
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 basedapplications
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 wont support
It supports ERP such as SAP, Siebel 7.0, people Soft8.8
But WR supports Siebel 6.0, people soft 6.0
-
7/27/2019 4699901-qtp-ppt(3)
9/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 9
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
-
7/27/2019 4699901-qtp-ppt(3)
10/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 10
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 Current Version
-
7/27/2019 4699901-qtp-ppt(3)
11/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 11
Environment needs for QTP -
System Requirement : IBM-PC (or) Equivalent to P3
Hardware Drive : 250MB of Free Memory space
RAM : 256MB of RAM
OS : M/S windows 2000 server with 3-4 service packM/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
-
7/27/2019 4699901-qtp-ppt(3)
12/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 12
Overview of QTP -
1) Testing Process of QTP
2) Windows Structure of QTP
3) Add Ins of QTP
4) Architecture of QTP5) Execution process in QTP
6) Development of Automation Test
7) Recording Modes in QTP
8) Object Repository
9) Object Spy
10) Transaction
11) Virtual Object
12) Check Points
13) Actions
14) Exception Handling
15) Object identification
16) Ordinal Identifier
17) Smart Identification
18) Output Values
19) Synchronization point20) QTP Run Modes
21) Regular Expressions
22) Descriptive Programming
23) Environment Variables
24) VB-Script
25) Hoe to work with Functions
26) Associated Library
-
7/27/2019 4699901-qtp-ppt(3)
13/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 13
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
-
7/27/2019 4699901-qtp-ppt(3)
14/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 14
Window Structure of QTP -
1) Test Pane
2) Active Screen3) Data Table
4) Debug Viewer
-
7/27/2019 4699901-qtp-ppt(3)
15/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 15
Add Ins of QTP -
It gives information about the technology supported by the QTP
By default three Add Ins are there in QTP
1) ActiveX
2) VB
3) Web
Additional Add ins:
1) Java
2) Oracle3) People soft
4) .NET
5) Terminal Emulator
6) SAP
7) Siebel
-
7/27/2019 4699901-qtp-ppt(3)
16/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 16
Add In Manager
-
7/27/2019 4699901-qtp-ppt(3)
17/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 17
Architecture Of QTP -
1) Execution Process in QTP
2) Development of Automation Test1) Recording
2) Writing3) Function Generator
-
7/27/2019 4699901-qtp-ppt(3)
18/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 18
Recording Modes of QTP -
There are three recording modes in QTP -
1)Normal Recording Mode
2) Analog Recording Mode3) Low Level Recording Mode
-
7/27/2019 4699901-qtp-ppt(3)
19/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 19
Record a Test
-
7/27/2019 4699901-qtp-ppt(3)
20/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 20
Record & Run Settings-
-
7/27/2019 4699901-qtp-ppt(3)
21/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 21
Run a Test and Save Results-
-
7/27/2019 4699901-qtp-ppt(3)
22/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 22
View Test Results-
-
7/27/2019 4699901-qtp-ppt(3)
23/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 23
Object Repository-
Object Repository is nothing but a storage location. It contains the collectionlogical name and physical description of a particular object.
Logical Name: For Naming Convention
Physical Description : is Nothing but expected physical properties
Two types of Object Repositories are available in QTP-
1) Per Action (.mtr)
2) Shared Object Repository (.tsr)
-
7/27/2019 4699901-qtp-ppt(3)
24/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 24
Open the Object Repository Dialog Box-
-
7/27/2019 4699901-qtp-ppt(3)
25/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 25
Object Spy-
Object spy is used to display or view all the physical properties and methods of an object or awindow based on the requirement.
Example: If window(Login). Exists Then
Msgbox(Pass)
else
Msgbox(Fail)
End If
-
7/27/2019 4699901-qtp-ppt(3)
26/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 26
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,14window(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
-
7/27/2019 4699901-qtp-ppt(3)
27/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 27
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 Point
2) Text/ Text Area Check Point
3) Bitmap Check point
4) Database Check Point
5) Table Check Point
6) Page Check Point
7) XML Check Point
8) Image Check Point
9) Accessibility Check Point
-
7/27/2019 4699901-qtp-ppt(3)
28/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 28
Checkpoint Types
-
7/27/2019 4699901-qtp-ppt(3)
29/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 29
Inserting a Checkpoint During Recording-
-
7/27/2019 4699901-qtp-ppt(3)
30/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 30
Insert a Checkpoint After Recording-
-
7/27/2019 4699901-qtp-ppt(3)
31/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 31
Identifying a Failed Checkpoint-
-
7/27/2019 4699901-qtp-ppt(3)
32/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 32
Actions-
Action is nothing but a logical portion to entire script file
based on the requirement. Each and every action shouldhave meaningful result.
Types of Actions:
1) Regular (By default)
2) Reusable3) External
How to work with Actions:
1) Call to copy of Action
2) Call to Existing Action
-
7/27/2019 4699901-qtp-ppt(3)
33/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 33
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).SetSecureaxisittDialogLogin.Close
After Parameterization
Dialog(Login).Activate
Dialog(Login).WinEdit(Login name).Set DataTable(name, dtglobalsheet)
Dialog(Login).WinEdit(Password). (password, dtglobalsheet)
DialogLogin.Close
-
7/27/2019 4699901-qtp-ppt(3)
34/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 34
Using Data Sheet (Global, Local & Location)-
-
7/27/2019 4699901-qtp-ppt(3)
35/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 35
Setting the Parameter Value-
-
7/27/2019 4699901-qtp-ppt(3)
36/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 36
Test Results Iterations-
-
7/27/2019 4699901-qtp-ppt(3)
37/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 37
Exception Handling-
It enables Quick test to detect and handle when unexpectederror 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
-
7/27/2019 4699901-qtp-ppt(3)
38/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 38
Object Identification-
By using object identification we can map customer userdefined object to standard Class.
Two types of properties are their in object Identification:
1) Mandatory Properties2) Assistive properties
-
7/27/2019 4699901-qtp-ppt(3)
39/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 39
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) Index
2) Location
3) Creation time
-
7/27/2019 4699901-qtp-ppt(3)
40/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 40
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 Properties
2) Optional Filter Properties
-
7/27/2019 4699901-qtp-ppt(3)
41/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 41
Synchronization Point-
Synchronization point maintains the time coordinationbetween testing process and your application process.
There are 4 types of synchronization points:
1) Sync2) Wait, wait(5) or wait 5
3) Wait Property
4) Exist
-
7/27/2019 4699901-qtp-ppt(3)
42/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 42
QTP Test Run Modes-
In QTP, we have 2 types of run modes-
1) Normal
2) Fast
-
7/27/2019 4699901-qtp-ppt(3)
43/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 43
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
U i R l E i
-
7/27/2019 4699901-qtp-ppt(3)
44/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 44
Using a Regular Expression-
-
7/27/2019 4699901-qtp-ppt(3)
45/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 45
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
-
7/27/2019 4699901-qtp-ppt(3)
46/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 46
Descriptive Programming-
Without using the object repository test engineer can develop
automation test in this particular accept, we need to use atechnique 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
H k h E l bl
-
7/27/2019 4699901-qtp-ppt(3)
47/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 47
How to work with Environmental variables-
It is a special type of variable which is use to expose thedata related to environment.
Environment Variables
Built In user defined
Internal External
-
7/27/2019 4699901-qtp-ppt(3)
48/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 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 center
-
7/27/2019 4699901-qtp-ppt(3)
49/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 49
Comments & Queries-
Queries are always welcome.
-
7/27/2019 4699901-qtp-ppt(3)
50/50
Sunday, October 13, 2013 Ashish Kumar Srivastava 50
Feedback-
-Please spend few minutes from yourvaluable time to provide your feedback.
-It will help us to improve in next sessions.
Thanks & Happy Testing..