HP Quick Test Professional




            Vitaliy Ganzha, 2012
What is HP QTP?

   Tool for functional and regression testing
   Supported environments: .NET, Java, Visual Basic,
    Web, Web-services, SAP, Oracle apps, Delphi*,
    Flash*
   Browser support: Internet Explorer and Firefox (from
    QTP 11, with add-in) record and playback, Chrome –
    playback (with add-in)
   Uses VBScript as scripting language
   Can be integrated with HP Quality Center
Drawbacks

   VBScript as scripting language
   Runs on MS Windows only
   Do not support some browsers (Opera,
    Safari)
   High licensing costs
Main Window
QTP Parts

   Test – collection of actions (external and internal). Action – is
    the script. Can be presented in Expert or in Keyword views
   Function libraries (VBscript)
   Object recognition components: add-ins.
   Object repository, descriptive programming
   Data tables
   Active screen
   Checkpoints
   Debugger
QTP Parts (Slide 2)

   Reporting
   QC integration
   Recording (normal, low-level, analog)
   Synchronization
   Data sharing
   Access to internal objects (.Object)
   Recovery scenarios
QTP Test

   QTP test is the collection of:
    –   Actions
    –   Associated libraries
    –   Object repositories
   Has it’s own settings (user-defined, iterations
    count etc.)
   Can have input and output parameters
Actions

   Actions help divide your test into logical units, such as the main
    sections of a Web site, or specific activities that you perform in
    your application.
   Actions is the scripts with associated object repositories
   Actions can be:
     –   Reusable
     –   Non-reusable
     –   External
     –   Nested action
   Actions can have in and put parameters
Associated libraries

   Associated libraries used to split code into
    external files
   Written with VBS (but can use QTP’s objects
    such as Reporter, Object Repository)
   Associated to test
   Can be debugged
Add-ins
   QTP uses add-ins to be able to
    work with test environment
   There are several add-ins
    shipped with QTP: .Net, Java,
    Web, Web Services etc.
   Some add-ins can be supplied
    by third-party company (Flash
    add-in for example)
How QTP Recognize objects

   It depends on Environment (Java, .NET or Web)
   For every object class, QTP has a default set of
    properties that it always learns:
    1.   Mandatory
    2.   Assistive
    3.   Ordinal identifier
   Smart identification
   User can parameterize identification properties
Object Repository

   Storage for identification properties
   Objects organized into hierarchies
   Repository can be local or shared
   Object Repository Manager allows to edit
    external repositories
   Highlight object
   User still need to define properties manually
Object Spy

   Use this tool to view
    object’s properties and
    methods
   Allow to see native
    properties and methods
   Quick check if
    environment can be
    recognized
Alternatives to Object Spy

   Firebug (Mozilla Firefox) for Web
   Developers Tools (IE, v>=8) for Web
   Spy++, WinSpy++, Winspector for Windows
    applications
   A lot of others….
Descriptive programming
   Define identification properties not in OR, but in code itself
   You may use it: for quick implementation or you don’t have rights to
    modify OR or you if you want to iterate over collection of similar
    objects, etc…
   Descriptions can be:
      – Dynamic
      – Static
   Identification using OR is quicker!
   I prefer OR as it:
      – Clear
      – Centralized
      – Allow you easy edit/compare/merge
      – Highlight object
Active Screen

   Provides a snapshot of your application as it
    appeared during a recording session
   Enables you to parameterize object values
    and insert checkpoints, methods
Data table
   You can specify data for script in data table (for data-driven tests)
   Test will be iterated automatically over the data
   Functionality similar to Excel (with formulas, etc.)
   There are Global and per-action data table
   Script can create new data table
   Data can be imported/exported from Excel
Debugger

   Main possibilities of QTP Debugger:
    –   Breakpoints
    –   Step in/over/out
    –   Watch variables
    –   Execute code immediately
    –   Pause script execution
Reporting in QTP
   Standard method: Reporter object
          Reporter.ReportEvent micFail, "Custom Step", “Details"
   Report is very verbose (usually it make no sense to show them to business-
    persons and steak-holders).
   There is Report Viewer.
   Often Framework has custom reporting
QC integration

   Create tests and save them in quality Center project
   View QuickTest test scripts
   Run your tests and view the results in Quality Center
   Associate external files for all tests or for a single test
   Report defects to a Quality Center project either
    automatically as they occur, or manually directly from the
    QuickTest Run Results Viewer
Record/Playback
   QTP automatically adds objects to repository during record process
   Normal recording –works when environment is “open” to QTP
     – Analog Recording This method enables you to record the exact
       mouse and keyboard operations you perform in relation to either
       the screen or the application window. In this recording mode,
       QuickTest records and tracks every movement of the mouse as
       you drag the mouse around a screen or window. It recorder into
       file.
     – Low-level – clicks on coordinates

   Events to be recorder can be configured
   Playback has Fast and Normal modes
Synchronization
   Sync, sync, sync!!!
   Wait – is a bad practice, do not overuse it
   Object synchronization timeout setting of the script
   Sync method of browser Waits for the browser to complete the current
    navigation.
   Browser Navigation Timeout - amount of time that QuickTest waits for
    a Web page to load
   WaitProperty method
   Exist method
Data sharing

   Necessary part of every team
   Global Dictionary
   Environment variables
   Action’s input and input parameters
   Data table
Checkpoints in QTP

   Check objects against expected data
   There are several checkpoints:
    –   Standard
    –   Image
    –   Bitmap
    –   Table
    –   Accessibility
    –   XML
    –   DB
Access to internal object

   Powerful instrument when you need to get better control or
    need to do non-standard operation
   You get access to object’s internal API
   Supported not for all environment (works for Java, .NET,
    Internet Explorer, Firefox)
   Example: to set value in some custom JFormattedTextField
    fields you may use such code:
    JavaWindow(“Test”).JavaEdit(“JFormattedTextField”).Set “some val”
    JavaWindow(“Test”).JavaEdit(“JFormattedTextField”).Object.commitEdit()
Recovery Scenarios
   Recovery scenarios activate specific recovery operations when trigger events
    occur (when occurs unexpected events, errors, and application crashes during
    a run session )
   A recovery scenario consists of the following:
     –   Trigger Event. The event that interrupts your run session. For example, a window that
         pops up on the screen, or a QuickTest run error.
     –   Recovery Operations. The operations to perform to enable QuickTest to continue
         running the test after the trigger event interrupts the run session. For example,
         clicking an OK button in a pop-up window, or restarting Microsoft Windows.
     –   Post-Recovery Test Run Option. The instructions on how QuickTest should proceed
         after the recovery operations have been performed, and from which point in the test
         QuickTest should continue, if at all. You may want to restart a test from the
         beginning, or skip a step entirely and continue with the next step in the test.
Demo

   Record Login into demo app
   Test login
   Add order
   Use checkpoints
Links
   http://qtp.blogspot.com – Tutorials
   http://www.wiziq.com/tutorial/54936-qtp-tool-features-presentation - QTP Features
    presentation

More Related Content

PPT
Hp Quick Test Professional
PPT
First QTP Tutorial
PPT
QTP Online Training
PPT
QTP with Descriptive programming
PPTX
QTP Power Point Presentation
PPT
Qtp Basics
PPT
Qtp 92 Tutorial
PPT
Qtp Training Deepti 1 Of 4187
Hp Quick Test Professional
First QTP Tutorial
QTP Online Training
QTP with Descriptive programming
QTP Power Point Presentation
Qtp Basics
Qtp 92 Tutorial
Qtp Training Deepti 1 Of 4187

What's hot (19)

PPT
Qtp Training
PPT
QTP Slides Presentation.
PPT
Qtp Training Deepti 3 Of 44256
DOC
What are the features in qtp
PPT
QTP Training by INFOTECH
PPT
1.qtp basics
PPT
Ppt Qtp
PPT
Rational Robot (http://www.geektester.blogspot.com)
PPTX
Test driving-qml
PPT
Copy of qtp presentation
PDF
Pro smartbooksquestions
DOC
Interview questions in qtp
DOC
Qtp questions and answers
DOC
Qtp interview questions and answers
DOC
Interview qutions
PPT
PDF
Basics of QTP Framework
PPTX
Uft Basics
PDF
Qtp certification training_material
Qtp Training
QTP Slides Presentation.
Qtp Training Deepti 3 Of 44256
What are the features in qtp
QTP Training by INFOTECH
1.qtp basics
Ppt Qtp
Rational Robot (http://www.geektester.blogspot.com)
Test driving-qml
Copy of qtp presentation
Pro smartbooksquestions
Interview questions in qtp
Qtp questions and answers
Qtp interview questions and answers
Interview qutions
Basics of QTP Framework
Uft Basics
Qtp certification training_material
Ad

Similar to HP Quick Test Professional (20)

DOCX
QTP Interview Questions and answers
DOC
Qtp interview questions and answers
PPT
Qtp92 Presentation
DOCX
Qtp basic
PPT
Why Automate
DOC
Qtp interview questions
DOC
Qtp interview questions
PPT
Qtp 9.2 tutorials
PPT
PPT
Qtp With Descriptive Programming
PPT
Qtp with descriptive programming
PPS
About Qtp 92
PPS
About Qtp_1 92
PPS
About QTP 9.2
PPTX
Automation Tool QTP
PPT
Dhanasekaran 2008-2009 Quick Test Pro Presentation
PPT
QTP Tutorial Slides Presentation.
PPTX
Cerberus_Presentation1
PPTX
Cerberus : Framework for Manual and Automated Testing (Web Application)
QTP Interview Questions and answers
Qtp interview questions and answers
Qtp92 Presentation
Qtp basic
Why Automate
Qtp interview questions
Qtp interview questions
Qtp 9.2 tutorials
Qtp With Descriptive Programming
Qtp with descriptive programming
About Qtp 92
About Qtp_1 92
About QTP 9.2
Automation Tool QTP
Dhanasekaran 2008-2009 Quick Test Pro Presentation
QTP Tutorial Slides Presentation.
Cerberus_Presentation1
Cerberus : Framework for Manual and Automated Testing (Web Application)
Ad

Recently uploaded (20)

PDF
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PDF
Lung cancer patients survival prediction using outlier detection and optimize...
PDF
Rapid Prototyping: A lecture on prototyping techniques for interface design
PDF
Connector Corner: Transform Unstructured Documents with Agentic Automation
PDF
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
PDF
zbrain.ai-Scope Key Metrics Configuration and Best Practices.pdf
PDF
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
PPTX
Training Program for knowledge in solar cell and solar industry
PDF
MENA-ECEONOMIC-CONTEXT-VC MENA-ECEONOMIC
PPTX
Microsoft User Copilot Training Slide Deck
PPTX
agenticai-neweraofintelligence-250529192801-1b5e6870.pptx
PDF
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
PDF
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
PDF
Data Virtualization in Action: Scaling APIs and Apps with FME
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
PDF
4 layer Arch & Reference Arch of IoT.pdf
PDF
The AI Revolution in Customer Service - 2025
PDF
EIS-Webinar-Regulated-Industries-2025-08.pdf
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
Early detection and classification of bone marrow changes in lumbar vertebrae...
Lung cancer patients survival prediction using outlier detection and optimize...
Rapid Prototyping: A lecture on prototyping techniques for interface design
Connector Corner: Transform Unstructured Documents with Agentic Automation
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
zbrain.ai-Scope Key Metrics Configuration and Best Practices.pdf
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
Training Program for knowledge in solar cell and solar industry
MENA-ECEONOMIC-CONTEXT-VC MENA-ECEONOMIC
Microsoft User Copilot Training Slide Deck
agenticai-neweraofintelligence-250529192801-1b5e6870.pptx
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
Data Virtualization in Action: Scaling APIs and Apps with FME
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
4 layer Arch & Reference Arch of IoT.pdf
The AI Revolution in Customer Service - 2025
EIS-Webinar-Regulated-Industries-2025-08.pdf

HP Quick Test Professional

  • 1. HP Quick Test Professional Vitaliy Ganzha, 2012
  • 2. What is HP QTP?  Tool for functional and regression testing  Supported environments: .NET, Java, Visual Basic, Web, Web-services, SAP, Oracle apps, Delphi*, Flash*  Browser support: Internet Explorer and Firefox (from QTP 11, with add-in) record and playback, Chrome – playback (with add-in)  Uses VBScript as scripting language  Can be integrated with HP Quality Center
  • 3. Drawbacks  VBScript as scripting language  Runs on MS Windows only  Do not support some browsers (Opera, Safari)  High licensing costs
  • 5. QTP Parts  Test – collection of actions (external and internal). Action – is the script. Can be presented in Expert or in Keyword views  Function libraries (VBscript)  Object recognition components: add-ins.  Object repository, descriptive programming  Data tables  Active screen  Checkpoints  Debugger
  • 6. QTP Parts (Slide 2)  Reporting  QC integration  Recording (normal, low-level, analog)  Synchronization  Data sharing  Access to internal objects (.Object)  Recovery scenarios
  • 7. QTP Test  QTP test is the collection of: – Actions – Associated libraries – Object repositories  Has it’s own settings (user-defined, iterations count etc.)  Can have input and output parameters
  • 8. Actions  Actions help divide your test into logical units, such as the main sections of a Web site, or specific activities that you perform in your application.  Actions is the scripts with associated object repositories  Actions can be: – Reusable – Non-reusable – External – Nested action  Actions can have in and put parameters
  • 9. Associated libraries  Associated libraries used to split code into external files  Written with VBS (but can use QTP’s objects such as Reporter, Object Repository)  Associated to test  Can be debugged
  • 10. Add-ins  QTP uses add-ins to be able to work with test environment  There are several add-ins shipped with QTP: .Net, Java, Web, Web Services etc.  Some add-ins can be supplied by third-party company (Flash add-in for example)
  • 11. How QTP Recognize objects  It depends on Environment (Java, .NET or Web)  For every object class, QTP has a default set of properties that it always learns: 1. Mandatory 2. Assistive 3. Ordinal identifier  Smart identification  User can parameterize identification properties
  • 12. Object Repository  Storage for identification properties  Objects organized into hierarchies  Repository can be local or shared  Object Repository Manager allows to edit external repositories  Highlight object  User still need to define properties manually
  • 13. Object Spy  Use this tool to view object’s properties and methods  Allow to see native properties and methods  Quick check if environment can be recognized
  • 14. Alternatives to Object Spy  Firebug (Mozilla Firefox) for Web  Developers Tools (IE, v>=8) for Web  Spy++, WinSpy++, Winspector for Windows applications  A lot of others….
  • 15. Descriptive programming  Define identification properties not in OR, but in code itself  You may use it: for quick implementation or you don’t have rights to modify OR or you if you want to iterate over collection of similar objects, etc…  Descriptions can be: – Dynamic – Static  Identification using OR is quicker!  I prefer OR as it: – Clear – Centralized – Allow you easy edit/compare/merge – Highlight object
  • 16. Active Screen  Provides a snapshot of your application as it appeared during a recording session  Enables you to parameterize object values and insert checkpoints, methods
  • 17. Data table  You can specify data for script in data table (for data-driven tests)  Test will be iterated automatically over the data  Functionality similar to Excel (with formulas, etc.)  There are Global and per-action data table  Script can create new data table  Data can be imported/exported from Excel
  • 18. Debugger  Main possibilities of QTP Debugger: – Breakpoints – Step in/over/out – Watch variables – Execute code immediately – Pause script execution
  • 19. Reporting in QTP  Standard method: Reporter object Reporter.ReportEvent micFail, "Custom Step", “Details"  Report is very verbose (usually it make no sense to show them to business- persons and steak-holders).  There is Report Viewer.  Often Framework has custom reporting
  • 20. QC integration  Create tests and save them in quality Center project  View QuickTest test scripts  Run your tests and view the results in Quality Center  Associate external files for all tests or for a single test  Report defects to a Quality Center project either automatically as they occur, or manually directly from the QuickTest Run Results Viewer
  • 21. Record/Playback  QTP automatically adds objects to repository during record process  Normal recording –works when environment is “open” to QTP – Analog Recording This method enables you to record the exact mouse and keyboard operations you perform in relation to either the screen or the application window. In this recording mode, QuickTest records and tracks every movement of the mouse as you drag the mouse around a screen or window. It recorder into file. – Low-level – clicks on coordinates  Events to be recorder can be configured  Playback has Fast and Normal modes
  • 22. Synchronization  Sync, sync, sync!!!  Wait – is a bad practice, do not overuse it  Object synchronization timeout setting of the script  Sync method of browser Waits for the browser to complete the current navigation.  Browser Navigation Timeout - amount of time that QuickTest waits for a Web page to load  WaitProperty method  Exist method
  • 23. Data sharing  Necessary part of every team  Global Dictionary  Environment variables  Action’s input and input parameters  Data table
  • 24. Checkpoints in QTP  Check objects against expected data  There are several checkpoints: – Standard – Image – Bitmap – Table – Accessibility – XML – DB
  • 25. Access to internal object  Powerful instrument when you need to get better control or need to do non-standard operation  You get access to object’s internal API  Supported not for all environment (works for Java, .NET, Internet Explorer, Firefox)  Example: to set value in some custom JFormattedTextField fields you may use such code: JavaWindow(“Test”).JavaEdit(“JFormattedTextField”).Set “some val” JavaWindow(“Test”).JavaEdit(“JFormattedTextField”).Object.commitEdit()
  • 26. Recovery Scenarios  Recovery scenarios activate specific recovery operations when trigger events occur (when occurs unexpected events, errors, and application crashes during a run session )  A recovery scenario consists of the following: – Trigger Event. The event that interrupts your run session. For example, a window that pops up on the screen, or a QuickTest run error. – Recovery Operations. The operations to perform to enable QuickTest to continue running the test after the trigger event interrupts the run session. For example, clicking an OK button in a pop-up window, or restarting Microsoft Windows. – Post-Recovery Test Run Option. The instructions on how QuickTest should proceed after the recovery operations have been performed, and from which point in the test QuickTest should continue, if at all. You may want to restart a test from the beginning, or skip a step entirely and continue with the next step in the test.
  • 27. Demo  Record Login into demo app  Test login  Add order  Use checkpoints
  • 28. Links  http://qtp.blogspot.com – Tutorials  http://www.wiziq.com/tutorial/54936-qtp-tool-features-presentation - QTP Features presentation

Editor's Notes

  • #16: Browser("Mercury Tours").Page("Mercury Tours").WebEdit("Name:=Author", "Index:=3").Set "Mark Twain" Dynamic: Set MyDescription = Description.Create() MyDescription("text").Value = "OK" MyDescription("width").Value = 50 Window("Error").WinButton(MyDescription).Click
  • #18: The following example uses the GlobalSheet property to return the global sheet of the run-time Data Table in order to add a parameter (column) to it. ParamValue=DataTable.GlobalSheet.AddParameter("Time", "5:45") You can also use this method to add a parameter to the global sheet (note that no value is returned). DataTable.GlobalSheet.AddParameter "Time", "5:45"