qtp presentation
TRANSCRIPT
![Page 1: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/1.jpg)
Quick Test ProfessionalPresenter
Syed Habebullah
![Page 2: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/2.jpg)
Introduction to Automation Testing
• What is Automation Testing ?• Benefits
• Automation Testing Process
![Page 3: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/3.jpg)
QTP Testing ProcessQuick Test testing process consists of 7 main phases
1. Preparing to record– Test Environment– Test Conditions
2. Recording a session on your application– Navigate according to Test Conditions
3. Enhancing your test– Adding logic and conditional statements– Parameterization– Inserting checkpoints
4. Debugging your test– Check that it operates smoothly and without interruption.
![Page 4: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/4.jpg)
QTP Testing Process5. Run Test
– Check the behavior of your application
6. Analyzing the test results
7. Reporting defects
![Page 5: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/5.jpg)
QTP Layered ArchitectureLogical name
Physical Description
Application
Layer1
Layer2
Layer3
![Page 6: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/6.jpg)
QTP Window Expert
![Page 7: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/7.jpg)
Tree and Expert View Relation
• Test Objects hierarchy can be seen in both the TreeView and the Expert View
![Page 8: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/8.jpg)
Object Spy• It is used to view object
properties and Methods
• Displays • Object hierarchy tree • Run-time object methods
or test object methods
![Page 9: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/9.jpg)
Object Repository
Locate object in repository Find data-dependant
property
Parameterize property’s value
• Interface between QTP Script and the Application
• Contains Logical Name and physical Description
![Page 10: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/10.jpg)
Recording Modes1. Normal recording
– Records the objects in your application and the operations performed on them. This mode is the default and takes full advantage of Quick Test’s test object model.
2. Analog Recording– Record the exact mouse and keyboard operations you perform in relation to
either the screen or the application window.
3. Low-Level Recording– Record on any object in your application, whether or not Quick Test
recognizes the specific object or the specific operation.
![Page 11: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/11.jpg)
Enhancing Tests
1. Parameterizing Test2. Regular Expressions3. Creating Checkpoints4. Creating Output Values5. Dividing Tests into Multiple Actions
![Page 12: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/12.jpg)
Parameterizing Tests To run the scenario with multiple sets of data.
Steps for Parameterization 1. Defining a Data Table Parameter2. Adding Parameter Values to a Data Table3. Modifying Steps Affected by Parameterization4. Running and Analyzing a Parameterized Test
Demo………………..
![Page 13: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/13.jpg)
Demo…………..
How to provide the data to the respective Parameter through Tree View
![Page 14: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/14.jpg)
Demo…………..How to provide the data to the respective Parameter through Expert View
![Page 15: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/15.jpg)
Regular Expressions• Regular expressions enable Quick Test to identify Objects and text
strings with varying values.
• User has to identify the data projected to be change, like dates, so to accepts any dates, user can use regular expression.
Example :
Actual Date format :
05/19/2004 (mm/dd/yyyy)
After Regular Expression:
[0-1][0-9]/[0-3][0-9]/200[0-9]
![Page 16: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/16.jpg)
Demo……
![Page 17: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/17.jpg)
Demo……..
Click icon
Do the changes as, shown below and select Regular Expression.
QTP will take the year from 2000 -2009
![Page 18: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/18.jpg)
CheckpointsUsed to check the current behavior of the application with the expected behavior.
Text /Text Area Checkpoint Standard Checkpoint Table Checkpoint Page checkpoint Database Checkpoint Image Checkpoint Accessibility Checkpoint Bitmap Checkpoint XML Checkpoint
![Page 19: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/19.jpg)
Text /TextArea Checkpointchecks that Current Text format with the Expected Text Format in a Web page or application window
![Page 20: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/20.jpg)
Table CheckpointChecks information in a table
![Page 21: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/21.jpg)
Page checkpoint• Checks the characteristics of a page
• Check how long a Web page takes to load or if a Web page contains broken links.
![Page 22: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/22.jpg)
Page checkpoint
![Page 23: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/23.jpg)
Database Checkpoint• Used to check current Database data with the Expected
Database data.
• Check that the value in a database query is correct.
• Demo………
![Page 24: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/24.jpg)
Bitmap Checkpoint• Checks an area of a Web page or application
after capturing it as a bitmap
• Check that a Web page (or any portion of it) is displayed as expected.
• Demo………….
![Page 25: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/25.jpg)
Bitmap Checkpoint
![Page 26: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/26.jpg)
XML Checkpoint• Checks the data content of XML documents
• XML file checkpoints are used to check a specified XML file; XML application checkpoints are used to check an XML document within a Web page.
• Demo………….
![Page 27: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/27.jpg)
XML Checkpoint
XMLFile("Poem.xsl").Check CheckPoint("Poem.xsl_2")
![Page 28: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/28.jpg)
Image Checkpoint
![Page 29: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/29.jpg)
Accessibility Checkpoint
![Page 30: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/30.jpg)
Creating Output Values• This is just reverse to the Parameterization, In
this case QTP takes the data from the application and displays the same in the Data Table.
![Page 31: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/31.jpg)
Creating Output Values
Window("Flight Reservation").WinEdit("Name:").Output CheckPoint("Name:_3")
![Page 32: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/32.jpg)
Transactions
• A transaction represents the business process that you are interested in measuring
• You can measure how long it takes to run a section of your test by defining transactions.
• User can Plan the Scenario as transaction and use the Start Transaction and End Transaction while Recording.
![Page 33: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/33.jpg)
Transactions
Services.StartTransaction "Start"
Services.EndTransaction "Start"
![Page 34: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/34.jpg)
Actions• Actions help to divide Test Script into logical units
• Usage : 1)We can design more modular and efficient tests.
2)Actions enable you to parameterize specific components of a test 3)Two or more tests can call the same action 4)Complex tests may have many actions and may share actions with
other tests.
• Example:
![Page 35: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/35.jpg)
ActionsWe can divide Test Script into multiple actions by creatingnew actions or by inserting existing actions.
Kinds of actions:• Non-Reusable Action : An action that can be used only in the
test in which it was created, and only once.
• Reusable Action : An action that can be called multiple times by the test in which it was created (the local test) as well as by other tests.
• External Action : A reusable action created in another test. External actions are read-only in the calling test. They can be modified only in the test in which they were created.
![Page 36: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/36.jpg)
Creating New Actions• We can add new actions to Test Script during a recording session or
while designing Test Script.
![Page 37: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/37.jpg)
Splitting ActionsWe can split an existing action into two sibling
actions or into parent-child nested actions.
We cannot split an action and the option is disabled
• when an external action is selected• when the first line of the action is selected• while recording a test• while running a test• when you are working with a read-only test
![Page 38: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/38.jpg)
Splitting Actions
![Page 39: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/39.jpg)
Inserting Existing Actions• We can insert an existing action by inserting a copy of
the action into Test Script, or by inserting a call to the original action.
• Example:
![Page 40: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/40.jpg)
Inserting Existing Actions• Copy of Action : It copied in its entirety, including checkpoints, parameterization, and the
corresponding action tab in the Data Table.
![Page 41: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/41.jpg)
Inserting Existing Actions• Calls to Actions: We can insert a call (link) to a reusable action that resides in your
current test (local action), or in any other test (external action).
Tree View
Expert View
![Page 42: QTP Presentation](https://reader035.vdocuments.site/reader035/viewer/2022062614/5467e566b4af9f42298b4e6b/html5/thumbnails/42.jpg)
Setting Action Properties
• The Action Properties enables to modify an action name, add or modify an action description, and set an action as reusable.