Date post: | 06-Apr-2018 |
Category: |
Documents |
Upload: | poorna-chandra-k |
View: | 219 times |
Download: | 0 times |
8/3/2019 Some of the Key Concepts of QTP
http://slidepdf.com/reader/full/some-of-the-key-concepts-of-qtp 1/12
Some of the Key Concepts of QTP
Some of the Key Concepts of QTP
TABLE OF CONTENTS
Wipro Confidential
Name Domain/Account
Author Pavani TIS
Reviewer Sandhya Rani Sangeetam TIS
Approver SriKrishna Nedunuri TIS
1
8/3/2019 Some of the Key Concepts of QTP
http://slidepdf.com/reader/full/some-of-the-key-concepts-of-qtp 2/12
Some of the Key Concepts of QTP
TABLE OF CONTENTS
1 INTRODUCTION TO TESTING
1.1. MANUAL TESTING:
1.2. AUTOMATION TESTING:
1.3 AUTOMATED TOOLS
1.4 TYPES OF AUTOMATED TOOLS:
2 QTP (Quick Test Professional)
2.1 ADDING MANAGER :
2.2 QTP SCREEN
2.3 R ECORDING AND RUNNING
2.3.1 Record and Run Settings:
2.3.2 Operational overview of Recording:
2.3.3. Recording Modes:
2.4 OBJECT REPOSITORY2.5 OPERATIONS ON OBJECT REPOSITORY
2.6 OBJECT IDENTIFICATION
2.6.1 QTP learns the information in the following in case only normal brain
2.6.2 QTP learns the information in the following way in case of smart
brain2.6.3 QTP will use the information in the following way to identify the
object during execution
2.7 ORDINAL IDENTIFIERS
2.8 SMART IDENTIFICATION
2.9 OBJECT SPY
Wipro Confidential 2
8/3/2019 Some of the Key Concepts of QTP
http://slidepdf.com/reader/full/some-of-the-key-concepts-of-qtp 3/12
Some of the Key Concepts of QTP
1. Introduction to Testing
There are two ways of Testing1. Manual Testing
2. Automation Testing
1.1. Manual Testing:
It is a way of testing in which one will perform all the phases of software
testing life cycle like Test planning, Test development, Test execution, Result analysis, Bug
tracking, and Reporting are accomplished manually, successfully with human efforts
Drawbacks of Manual Testing:
• More number of people are required
• Time consuming
• Human mistakes (no accuracy)
• Tiredness
• Simultaneous action are not possible
• Cannot repeat the same task again and again in a perfect manner.
1.2. Automation Testing:
Automation testing is a process in which all the drawbacks of manual testing
are addressed properly and provides speed and accuracy to the existing testing process.Drawbacks of Automation Testing:
• Tools are expensive
• Cannot automate all the area
• Lack of experts
1.3. Automated Tools:
Automated tool is an assistant of a test engineer, which works based on theinstructions and information given by a test engineer.
General Frame Work to learn any automated Tool:
A test engineer should learn the following to work with any automated tool
• How to give the instructions?
• How to give the information?
• How to use its recording facility?
• How to use its play back facility?
• How to analyze the results?
Wipro Confidential 3
8/3/2019 Some of the Key Concepts of QTP
http://slidepdf.com/reader/full/some-of-the-key-concepts-of-qtp 4/12
Some of the Key Concepts of QTP
1.4 Types of Automated Tools:
A black box testing tools are broadly divided in to Three types
1. Functional tools (QTP, Win runner)2. Management Tools (Test Director/Quality Center)
3. Performance tools (Load Runner)
2. QTP (Quick Test Professional)
Type of the Tool: Functional Tool
Company: Mercury Interactive incorporation
Scripting Language: VB- Script
Version: #5.5, #6.5, #7.0, #7.6, #8.0, #8.2(2005), #9.0, #9.1,#9.2
2.1 Adding Manager:
Adding manager is a feature provided by QTP which is used for showing all thelist of adding’s while opening the QTP so that the user can select the desiredadding’s and then enter in to the QTP, Before the user access the QTP theadding manager will make the QTP compatible with all the selectedenvironments.
By default QTP is always compatible
with standard window’s environment.
Whenever we purchase QTP we get Three built-in adding’s.
1. Activex
2. Visual Basic
3. Web.
Apart from the above add-ins one needs to purchase the add-inns by payingextra cost.
2.2 QTP screen
QTP screen can be divided in to five parts
1. Test Pane
2. Active screen
3. Data Table
Wipro Confidential 4
8/3/2019 Some of the Key Concepts of QTP
http://slidepdf.com/reader/full/some-of-the-key-concepts-of-qtp 5/12
Some of the Key Concepts of QTP
4. Debug Viewer Pane
5. Tool Options
1. Test Pane:
Test pane is an area provided by QTP, which is used for developing, viewing,and modifying the test screen. It represents the test scripts in two views
(a). Expert view: It represents the script in VB script format
(b). Keyword view: Keyword view represents the script using a graphical user interface (GUI) which is further divided in to three parts.
• Item
• Operation Value
• Documentation
2. Active Screen:
Active screen is an area provided by QTP, which holds the snapshots of eachand every script statements and used for the following.
• Easily understanding the script
• Easily enhancing the script.
3. Data-Table:
The date table is originally called as formula1 sheet developed by third party andintegrated with QTP.
Features:
• It is used for holding the test data
• It isolates the test script from the data source.
• It provides the facility to import the test data from different datasources like excel files, data base and flat files (a file with outhaving format)
• It allows the user to interact with the data directly
4. Debug Viewer Pane:
Debugging is a process of executing the script or a program in a user desired
passion with some temporary breaks in order to identify the errors. Debug viewer pane is an area provided by QTP which is used for viewing, modifying or settingthe current values of variables or expressions during the execution break with thehelp of three Tabs by name Watch expression, Variables and Command
Wipro Confidential 5
8/3/2019 Some of the Key Concepts of QTP
http://slidepdf.com/reader/full/some-of-the-key-concepts-of-qtp 6/12
Some of the Key Concepts of QTP
5. Tool- Options:
All the options available in the menu bar, file tool bar and testing tool bar are known astool-options.
2.3 RECORDING AND RUNNING
2.3.1 Record and Run Settings:
For every new test one has to compulsorily do these settings before recording or running. Thesesettings will make to understand on which applications it need to concentrate while recording or running.
Navigation to Record and run:
• Activate the menu item test
• Select the option record and run settings
• Select one of the following optionsRecord and run test on any opened windows based application
Record and run on these applications (opened on session start)
• If at all second option is selected then click on add button
• Browse the desired application part
• Click on OK
• Click on apply & OK.
2.3.2 Operational overview of Recording:
During recording QTP will do the following.
1. It will generate corresponding script statements for every user actionon the application.
2. It will store the required related information in the object repository.
Operational overview of Running:
During running QTP will be doing the following.
1. It will read the script statement and understands what action to beperformed on which object.
2. Then it realizes it need to identify the object first to perform the action
3. To identify the object it requires some information for that informationit will go to the object repository and search.4. Once the information is found using this information it will try to
identify the original object.5. Once the object is identified it will perform the action on it.
2.3.3. Recording Modes:
There are three types of recording mode
Wipro Confidential 6
8/3/2019 Some of the Key Concepts of QTP
http://slidepdf.com/reader/full/some-of-the-key-concepts-of-qtp 7/12
Some of the Key Concepts of QTP
(a).Context sensitive recording mode or Normalrecording mode
(b). Analog Recording Mode
(c). Low-level Recording mode.
(a). Context sensitive Recording mode:
It is used for recording the operations performed on the standardGUI object in different situations
(b). Analog Recording Mode:
It is a special recording mode provided by QTP, which is used for recording the continuous operations
Navigation for recording:
• Keep the tool under normal recording mode
• Activate the menu item test
• Select the option analog recording
• Select one of the following optiono Record relative to the screen
o Record relative to the following window
• If at all second option is selected specify the window titlewith the help of the Hand Icon
• Click on start analog record
(c). Low-Level Recording:
It is a special recording mode provided by QTP, which is used for recording at least some minimum operations on the non-supported environmentsalso.
2.4 OBJECT REPOSITORY
Object repository is a storage place where one can store the objectsinformation and it also acts as interface between the test script and theAUT(application under test) in order to identify the original objects duringexecution
There are two types of object repository they are
(1). Per-Action Repository:
Wipro Confidential 7
8/3/2019 Some of the Key Concepts of QTP
http://slidepdf.com/reader/full/some-of-the-key-concepts-of-qtp 8/12
Some of the Key Concepts of QTP
If at all this type is selected as an object repository then the QTPwill be automatically creating and managing an individual repository for everyaction.
(2). Shared Repository:
Shared repository has to be created and managed manuallyonce a shared repository is created it can be shared among number of tests
Advantages:
• Easy to maintain
• Re-usability
Navigation for creating a shared Repository or Converting a per-action into shared:
• Collect the objects information in to the object repository
• Click on export
• Browse the desired location• Specify the file name with .TSR (Test Shared Repository)
extension
• Click on save button
Navigation for Creating the Shared Repository to the current test:
• Activate the menu item test
• Select the option settings
• Select the resources tab
• Select the option shared in the object repository type section
• Browse the desired repository file
• Click on apply & OK
2.5 OPERATIONS ON OBJECT REPOSITORY
Navigation for adding the objects in to the object repository:
• Open the object repository
• Click on add objects button
•
Click on the title bar of the window• Click on ok
• Select one of the following options
o Only the selected objects
o Selected objects and all its direct children
o Selected objects and all its descendents
Click on OK
Wipro Confidential 8
8/3/2019 Some of the Key Concepts of QTP
http://slidepdf.com/reader/full/some-of-the-key-concepts-of-qtp 9/12
Some of the Key Concepts of QTP
Navigation for deleting the objects from the object repository:
• Select the desired object to be deleted in the objecthierarchy
• Right click on it
• Select the option delete
• Confirm the deleting by clicking on Yes.
Navigation for Re naming the objects:
Select the desired object in the object hierarchy
• Right click on it
• Select the option Rename
• Specify the desired name
Navigation for updating the properties list:
• Select the desired object in the object hierarchy
• Click on add/Remove button
• Select the desired properties to be added in to the properties
list
• Deselect the properties to be removed from the properties
list
• Click on OK
Highlight:Highlight button is used for highlighting the corresponding object in the
AUT so that a test engineer can clearly understand which objects information isthat.
2.6 OBJECT IDENTIFICATION
Object identification is based on four types of properties and an ordinal identifier
Types of properties:1. Mandatory Properties
2. Assistive properties
3. Base-Filter Properties4. Optional Filter properties
A test engineer can specify the list of mandatory properties, List of assistive properties,
List of base filter properties, list of ordinal filter properties and an ordinal identifier.
2.6.1 QTP learns the information in the following in case only normalbrain:
Wipro Confidential 9
8/3/2019 Some of the Key Concepts of QTP
http://slidepdf.com/reader/full/some-of-the-key-concepts-of-qtp 10/12
Some of the Key Concepts of QTP
First of all the QTP will learn all the mandatory properties at a time and then think
weather these properties are sufficient to identify the object uniquely. If it feels sufficient
then it will stop learning otherwise it will learn the first assistive property and once againstops and thinks weather these properties are sufficient to identify the object uniquely. If
it feels sufficient then it stops learning otherwise learns the second assistive property and
checks weather these properties are sufficient or not. This process continuous till the QTPsatisfies or up to the end of the assistive properties list. At the end of the assistive
properties list also if it feels not satisfied then it will finally learn the ordinal identifier
and stops learning.
2.6.2 QTP learns the information in the following way in case of smart brain also:
While learning the mandatory properties along with them it willlearn the base filter properties, optional filter properties and stores them in thesecret place.
It considers the mandatory properties only and check weather these properties are sufficient to identify the object uniquely. And repeats the
above process.
2.6.3 QTP will use the information in the following way to identifythe object during execution:
First of all QTP will use all the properties present in the object repository
except ordinal identifier and try to identify the object. If at all the object is not identified
then it will forget about all these properties and freshly enters in to the secret place.QTP will consider all the base filter properties and try to identify the
object and forms a list of all the objects that are matched with the base filter properties.
If the list contains only one object then that is the object otherwise it will take the support
of first optional filter property and try to match with all the object present in the list and
forms a new list of all the objects that are matched with that property and then check weather the list is containing one object or more that one object. If the list is containing
more than one object then it will consider the second optional filter property and repeatsthe whole procedure till the list contains on object or up to the end of the optional
properties list.
At the end of the optional filter properties list also if the list is containing more than oneobject then it will finally go to the object repository and check weather the ordinal
identifier is available or not. If at all the ordinal identifier is available it will identify the
object roughly using that otherwise HANDSUP.
2.7 Ordinal Identifiers:
There are three types of ordinal identifiers1. Location2. Index
3. Creation time
1. Location:
Wipro Confidential 10
8/3/2019 Some of the Key Concepts of QTP
http://slidepdf.com/reader/full/some-of-the-key-concepts-of-qtp 11/12
Some of the Key Concepts of QTP
If at all the location is selected, as an ordinal identifier then the QTP will
generate a sequence of numbers from 0,1,2,3 based on the sequence of the objects located
in AUT.
2. Index:
If at all the index is selected as an ordinal identifier than the QTP willgenerate the numbers from 0,1,2,3 ….based on the sequence of the programs of the
objects.
3. Creation Time (especially for web pages):If at all creation time is selected as an ordinal identifier the QTP
will generate the number from 0,1,2,3 … based on the loading time of the webpages
2.8 Smart Identification:When ever the QTP is unable to identify the objects with the help of the
properties present in the object repository then the special mechanism provided by QTP
to identify the object smartly with some other properties is known as smart identification.
Navigation for Object identification Configuration:
• Activate the menu item tools
• Select the option object identification
• Select the desired environment
• Select the desired object type
• Specify the desired list of mandatory properties and assistive
properties with the help of corresponding add/ remove buttons
• Select the ordinal identifier
• Smart identification
• Select the check box enable smart identification
• Click on configure button
• Specify the desired list of base filter properties and optional filter
properties with the help of add/remove buttons
• Click on OK
• Click once again on Ok
2.9 Object Spy:Object spy is a handy feature provided by QTP which is used for
showing the complete objects information like list of properties and their values,list of methodology, syntax for methodology and description of methods then andthere on the spot immediately of both test objects as well as runtime objects.
Navigation for Object SPY:
• Activate the menu item tools
Wipro Confidential 11
8/3/2019 Some of the Key Concepts of QTP
http://slidepdf.com/reader/full/some-of-the-key-concepts-of-qtp 12/12
Some of the Key Concepts of QTP
• Select the option object spy
• Click on the hand icon
• Click on the desired object
Types of Objects:There are two types of objects 1.Run time objects
2. Test objects
1. Run time objects:All the original objects present in the AUT are known as run time objects
2. Test Objects:Test objects are the reference objects created by the QTP for run time
objects, stored in object repository and used by the QTP for the original objects
Wipro Confidential 12