SlideShare a Scribd company logo
HP QTP for
Software Automation Testing
What is HP QTP?
 HP Quick Test Professional is automated testing software designed for
  testing various software applications and environments. It performs
  functional and regression testing through a user interface such as a
  native GUI or web interface.
 It works by identifying the objects in the application user interface or a
  web page and performing desired operations (such as mouse clicks or
  keyboard events); it can also capture object properties like name or
  Object ID.
 HP Quick Test Professional uses a VBScript scripting language to specify
  the test procedure and to manipulate the objects and controls of the
  application under test. To perform more sophisticated actions, users may
  need to manipulate the underlying VBScript.
 HP Quick Test Professional is usually used for "UI Based" Test
  Case Automation, it also can automate some "Non-UI" based Test Cases
  such as file system operations, database testing or Web services testing
Benefits of Automation Testing
What is Automation Framework?
 A test automation framework is a set of assumptions, concepts and
  tools that provide support for automated software testing.
 The main advantage of such a framework is the low cost for
  maintenance. If there is change to any test case then only the test case
  file needs to be updated and the Driver Script or Startup script will
  remain the same. Ideally, there is no need to update the scripts in case
  of changes to the application.
 Choosing the right framework/scripting technique helps in maintaining
  lower costs. The costs associated with test scripting are due to
  development and maintenance efforts.
 The approach of scripting used during test automation has effect on
  costs.
Types of Automation Frameworks
 Linear - procedural code, possibly generated by tools like
   those that use record and playback
 Structured - uses control structures - typically ‘if-else’,
  ‘switch’, ‘for’, ‘while’ conditions/ statements
 Data Driven - data is persisted outside of tests in a
  database, spreadsheet, or other mechanism
 Keyword Driven – based on the Keywords
 Hybrid - two or more of the patterns above are used
Testing Process
1. Analyzing your application

 The first step in planning your test is to analyze your application to determine
  your testing needs.
 What are your application’s development environments (for example Web,
  Java, or .NET)? You will need load Quick Test add-ins for these environments to
  enable Quick Test to identify and work with the objects in your application.
 What business processes and functionality do you want to test? To answer this,
  think about the various activities that customers perform in your application to
  accomplish specific tasks.
 Consider how to divide these business processes into smaller units. You will be
  creating actions based on these tasks. Smaller and more modular actions make
  your tests easier to read and follow, and help ease maintenance in the long run.
  At this stage, you can already begin creating test skeletons and adding actions
  to them.
Testing Process (Contd.)
2. Preparing the testing infrastructure

 Based on your testing needs, you determine what resources are
  required and create these resources, accordingly.
 Resources include shared object repositories containing test objects
  (which are representations of the objects in your application), function
  libraries containing functions that enhance Quick Test functionality, and
  so on.
 You also need to configure Quick Test settings so that Quick Test will
  perform the tasks you need, such as displaying a results report every
  time you run a test.
Testing Process (Contd.)
3. Building your tests and adding steps to them

 After the testing infrastructure is ready, you can begin building your
  tests. You can create one or more empty tests and add actions to them
  to create the testing skeletons.
 You associate your object repositories with the relevant actions, and
  associate your function libraries with the relevant tests, so that you can
  insert steps using keywords.
 You may also need to configure test preferences at this point.
Testing Process (Contd.)
4. Enhancing your test

 Inserting checkpoints into your test lets you search for a specific value
  of a page, object, or text string which helps you determine whether
  your application is functioning correctly.
 Broadening the scope of your test, by replacing fixed values with
  parameters, lets you check how your application performs the same
  operations with multiple sets of data.
 Adding logic and conditional or loop statements enables you to add
  sophisticated checks to your test.
Testing Process (Contd.)
5. Debugging, running, and analyzing your test

 You debug a test to ensure that it operates smoothly and without
  interruption.
 After the test is working correctly, you run it to check the
  behavior of your application. While running, Quick Test opens
  and performs each step in your test.
 You examine the test results to pinpoint defects in your
  application.
Testing Process (Contd.)
6.   Reporting defects

If you have Quality Center installed, you can report the defects you
discover to a database. Quality Center is the HP test management
solution.
TOM & TOC
 Test Object Model is a set of object types or Classes that Quick Test uses to
  represents the objects in our application.

 A Test Object Class comprises of a list of properties that can individually
  (uniquely) identify objects of that class and a set of appropriate methods that
  Quick Test can record for it.

   * A Test Object is an object that Quick Test creates in the test to correspond to
   (represent) the actual object in the application. Quick Test uses the stored
   information about the object during the run session to identify and check the
   object.

   * A run-time object is the real (actual) object in the application or Web site on
   which methods are performed during the run session.
Properties and Methods of Objects
  The property set for each test object is created and maintained by Quick Test.

  The property set for each run-time object is created and maintained by the
   object architect (creator) (Microsoft for Internet Explorer objects, Netscape for
   Netscape objects).

  Similarly, methods of test objects are methods that Quick Test recognizes and
   records when they are executed (performed) on an object while we are
   recording and that Quick Test executes when the test or component runs.

  Methods of Run-time object are the methods of the object in the application
   as defined by the object architect (creator). We can access and execute run-
   time object methods using the Object property.
*Some Important Points
 Each test object method we execute (perform) while recording is recorded as
  a separate step in the test. When we run the test, Quick Test executes
  (performs) the recorded test object method on the run-time object.

 Properties of test object are captured from object while recording. Quick Test
  uses the values of these properties to identify runtime objects in the
  application during a run session.

 Property values of objects in the application may change .To make the test
  object property values match the property values of the run-time object, we
  can modify test object properties manually while designing the test or
  component or using SetTOProperty statements during a run session. We can
  also use regular expressions to identify property values.

 We can view or modify the test object property values that are stored with
  the test or component in the Object Properties or Object Repository dialog
  box.
*Some Important Points (Contd.)
 We can view the syntax of the test object methods as well as the run-time
  methods of any object on our desktop using the Methods tab of the Object
  Spy.

 We can retrieve or modify property values of the TEST OBJECT during the run
  session by adding GetTOProperty and SetTOProperty statements in the
  Keyword View or Expert View. We can retrieve property values of the
  RUNTIME OBJECT during the run session by adding GetROProperty
  statements.

 If the available test object methods or properties for an object are not
  sufficient or they do not provide the functionality we need, we can access the
  internal methods and properties of any run-time object using the Object
  property. We can also use the attribute object property to identify Web
  objects in the application according to user-defined properties.

More Related Content

PPTX
Quality Assurance and Software Testing
PPTX
Testing ppt
PDF
Testing artifacts test cases
PDF
7 stages of unit testing
PPTX
Object Oriented Analysis
PDF
St & internationalization
PPTX
Integration in component based technology
PPTX
CTFL Module 02
Quality Assurance and Software Testing
Testing ppt
Testing artifacts test cases
7 stages of unit testing
Object Oriented Analysis
St & internationalization
Integration in component based technology
CTFL Module 02

What's hot (20)

PPTX
SE2018_Lec 20_ Test-Driven Development (TDD)
PPTX
Software Testing or Quality Assurance
PPTX
Software testing
PPT
Software testing for biginners
PPTX
Software testing introduction
PPT
Automated Testing vs Manual Testing
PPT
Test plan
PDF
Types of software testing
PPT
A survey of software testing
PPTX
Software testing
PDF
Stm unit1
PPT
Mercury Testdirector8.0 using Slides
PPT
Testing Presentation
PDF
Software testing
PPTX
CTFL Module 03
PPT
Taxonomy for bugs
PPTX
PPT
Testing strategies
PPT
Test plan
PPT
TESTING LIFE CYCLE PPT
SE2018_Lec 20_ Test-Driven Development (TDD)
Software Testing or Quality Assurance
Software testing
Software testing for biginners
Software testing introduction
Automated Testing vs Manual Testing
Test plan
Types of software testing
A survey of software testing
Software testing
Stm unit1
Mercury Testdirector8.0 using Slides
Testing Presentation
Software testing
CTFL Module 03
Taxonomy for bugs
Testing strategies
Test plan
TESTING LIFE CYCLE PPT
Ad

Similar to QTP Tutorial (20)

PPT
Hp Quick Test Professional
PPT
Qtp Basics
DOC
New features in qtp11
PPT
Qtpppt1
DOC
Qtp (basics to advanced)
PPT
Qtp Training Deepti 2 Of 44780
PDF
Qtp certification training_material
DOC
New features in qtp11
DOC
Qtp 11 new enhacements in
PPT
HP Quick Test Professional
PPT
Qtp with descriptive programming
PPT
Qtp With Descriptive Programming
PPT
QTP with Descriptive programming
PDF
Qtp In Depth
PPT
QTP 10.0_Kalyan Chakravarthy.ppt
PPT
PDF
Qtp user-guide
PPT
Test Automation Framework Designs
PPT
QTP Basics-2
PPT
Dynamic Content in QTP
Hp Quick Test Professional
Qtp Basics
New features in qtp11
Qtpppt1
Qtp (basics to advanced)
Qtp Training Deepti 2 Of 44780
Qtp certification training_material
New features in qtp11
Qtp 11 new enhacements in
HP Quick Test Professional
Qtp with descriptive programming
Qtp With Descriptive Programming
QTP with Descriptive programming
Qtp In Depth
QTP 10.0_Kalyan Chakravarthy.ppt
Qtp user-guide
Test Automation Framework Designs
QTP Basics-2
Dynamic Content in QTP
Ad

Recently uploaded (20)

PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Electronic commerce courselecture one. Pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
Big Data Technologies - Introduction.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Spectral efficient network and resource selection model in 5G networks
PPT
Teaching material agriculture food technology
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Empathic Computing: Creating Shared Understanding
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Review of recent advances in non-invasive hemoglobin estimation
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
NewMind AI Weekly Chronicles - August'25 Week I
Electronic commerce courselecture one. Pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Chapter 3 Spatial Domain Image Processing.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Big Data Technologies - Introduction.pptx
The AUB Centre for AI in Media Proposal.docx
Spectral efficient network and resource selection model in 5G networks
Teaching material agriculture food technology
Mobile App Security Testing_ A Comprehensive Guide.pdf
Approach and Philosophy of On baking technology
Advanced methodologies resolving dimensionality complications for autism neur...
Empathic Computing: Creating Shared Understanding
Dropbox Q2 2025 Financial Results & Investor Presentation
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Machine learning based COVID-19 study performance prediction
Review of recent advances in non-invasive hemoglobin estimation

QTP Tutorial

  • 1. HP QTP for Software Automation Testing
  • 2. What is HP QTP?  HP Quick Test Professional is automated testing software designed for testing various software applications and environments. It performs functional and regression testing through a user interface such as a native GUI or web interface.  It works by identifying the objects in the application user interface or a web page and performing desired operations (such as mouse clicks or keyboard events); it can also capture object properties like name or Object ID.  HP Quick Test Professional uses a VBScript scripting language to specify the test procedure and to manipulate the objects and controls of the application under test. To perform more sophisticated actions, users may need to manipulate the underlying VBScript.  HP Quick Test Professional is usually used for "UI Based" Test Case Automation, it also can automate some "Non-UI" based Test Cases such as file system operations, database testing or Web services testing
  • 4. What is Automation Framework?  A test automation framework is a set of assumptions, concepts and tools that provide support for automated software testing.  The main advantage of such a framework is the low cost for maintenance. If there is change to any test case then only the test case file needs to be updated and the Driver Script or Startup script will remain the same. Ideally, there is no need to update the scripts in case of changes to the application.  Choosing the right framework/scripting technique helps in maintaining lower costs. The costs associated with test scripting are due to development and maintenance efforts.  The approach of scripting used during test automation has effect on costs.
  • 5. Types of Automation Frameworks  Linear - procedural code, possibly generated by tools like those that use record and playback  Structured - uses control structures - typically ‘if-else’, ‘switch’, ‘for’, ‘while’ conditions/ statements  Data Driven - data is persisted outside of tests in a database, spreadsheet, or other mechanism  Keyword Driven – based on the Keywords  Hybrid - two or more of the patterns above are used
  • 6. Testing Process 1. Analyzing your application  The first step in planning your test is to analyze your application to determine your testing needs.  What are your application’s development environments (for example Web, Java, or .NET)? You will need load Quick Test add-ins for these environments to enable Quick Test to identify and work with the objects in your application.  What business processes and functionality do you want to test? To answer this, think about the various activities that customers perform in your application to accomplish specific tasks.  Consider how to divide these business processes into smaller units. You will be creating actions based on these tasks. Smaller and more modular actions make your tests easier to read and follow, and help ease maintenance in the long run. At this stage, you can already begin creating test skeletons and adding actions to them.
  • 7. Testing Process (Contd.) 2. Preparing the testing infrastructure  Based on your testing needs, you determine what resources are required and create these resources, accordingly.  Resources include shared object repositories containing test objects (which are representations of the objects in your application), function libraries containing functions that enhance Quick Test functionality, and so on.  You also need to configure Quick Test settings so that Quick Test will perform the tasks you need, such as displaying a results report every time you run a test.
  • 8. Testing Process (Contd.) 3. Building your tests and adding steps to them  After the testing infrastructure is ready, you can begin building your tests. You can create one or more empty tests and add actions to them to create the testing skeletons.  You associate your object repositories with the relevant actions, and associate your function libraries with the relevant tests, so that you can insert steps using keywords.  You may also need to configure test preferences at this point.
  • 9. Testing Process (Contd.) 4. Enhancing your test  Inserting checkpoints into your test lets you search for a specific value of a page, object, or text string which helps you determine whether your application is functioning correctly.  Broadening the scope of your test, by replacing fixed values with parameters, lets you check how your application performs the same operations with multiple sets of data.  Adding logic and conditional or loop statements enables you to add sophisticated checks to your test.
  • 10. Testing Process (Contd.) 5. Debugging, running, and analyzing your test  You debug a test to ensure that it operates smoothly and without interruption.  After the test is working correctly, you run it to check the behavior of your application. While running, Quick Test opens and performs each step in your test.  You examine the test results to pinpoint defects in your application.
  • 11. Testing Process (Contd.) 6. Reporting defects If you have Quality Center installed, you can report the defects you discover to a database. Quality Center is the HP test management solution.
  • 12. TOM & TOC  Test Object Model is a set of object types or Classes that Quick Test uses to represents the objects in our application.  A Test Object Class comprises of a list of properties that can individually (uniquely) identify objects of that class and a set of appropriate methods that Quick Test can record for it. * A Test Object is an object that Quick Test creates in the test to correspond to (represent) the actual object in the application. Quick Test uses the stored information about the object during the run session to identify and check the object. * A run-time object is the real (actual) object in the application or Web site on which methods are performed during the run session.
  • 13. Properties and Methods of Objects  The property set for each test object is created and maintained by Quick Test.  The property set for each run-time object is created and maintained by the object architect (creator) (Microsoft for Internet Explorer objects, Netscape for Netscape objects).  Similarly, methods of test objects are methods that Quick Test recognizes and records when they are executed (performed) on an object while we are recording and that Quick Test executes when the test or component runs.  Methods of Run-time object are the methods of the object in the application as defined by the object architect (creator). We can access and execute run- time object methods using the Object property.
  • 14. *Some Important Points  Each test object method we execute (perform) while recording is recorded as a separate step in the test. When we run the test, Quick Test executes (performs) the recorded test object method on the run-time object.  Properties of test object are captured from object while recording. Quick Test uses the values of these properties to identify runtime objects in the application during a run session.  Property values of objects in the application may change .To make the test object property values match the property values of the run-time object, we can modify test object properties manually while designing the test or component or using SetTOProperty statements during a run session. We can also use regular expressions to identify property values.  We can view or modify the test object property values that are stored with the test or component in the Object Properties or Object Repository dialog box.
  • 15. *Some Important Points (Contd.)  We can view the syntax of the test object methods as well as the run-time methods of any object on our desktop using the Methods tab of the Object Spy.  We can retrieve or modify property values of the TEST OBJECT during the run session by adding GetTOProperty and SetTOProperty statements in the Keyword View or Expert View. We can retrieve property values of the RUNTIME OBJECT during the run session by adding GetROProperty statements.  If the available test object methods or properties for an object are not sufficient or they do not provide the functionality we need, we can access the internal methods and properties of any run-time object using the Object property. We can also use the attribute object property to identify Web objects in the application according to user-defined properties.