QTP Training by INFOTECH

5,869 views
5,733 views

Published on

INFOTECH, Providing Disciplined Software Testing Practice

Published in: Business
15 Comments
22 Likes
Statistics
Notes
  • nice one... can you please mail this copy..
    my id is priya_241291@rediffmail.com
    Thanks
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • plz send me this material to my mail. ranavi.mca@gmail.com
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • its really usefull brother can u send me this to mail id: cbhareddy@yahoo.com
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • could u plzzz mail this ppt to my Email Id:adibaba431@gmail.com
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • can u send this material 2 my mail
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
5,869
On SlideShare
0
From Embeds
0
Number of Embeds
162
Actions
Shares
0
Downloads
1
Comments
15
Likes
22
Embeds 0
No embeds

No notes for slide

QTP Training by INFOTECH

  1. 1. QTP 9.2 QUICK TEST PROFESSIONAL 9.2
  2. 2. <ul><li>1. Introduction </li></ul><ul><li>2. Recording a Session </li></ul><ul><li>3. Running a Session </li></ul><ul><li>4. Object Management </li></ul><ul><li>5. Synchronization </li></ul><ul><li>6. Check Points </li></ul><ul><li>7. Output Values </li></ul><ul><li>8. Parameterization </li></ul><ul><li>9. Actions </li></ul><ul><li>10. Recovery Scenario Manager </li></ul>
  3. 3. Introduction <ul><li>Mercury Quick Test Professional 9.2 provides the industry’s best solution for functional test and regression test automation - addressing every major software application and environment. </li></ul>
  4. 4. What is QTP <ul><li>QTP stands QuickTest Professional </li></ul><ul><li>It is an automated testing tool provided by HP/Mercury Interactive </li></ul><ul><li>QTP integrates with other Mercury testing solutions including: </li></ul><ul><ul><li>TestDirector/Quality Center </li></ul></ul><ul><ul><li>WinRunner </li></ul></ul><ul><ul><li>LoadRunner </li></ul></ul><ul><li>Utilizes an add-in architecture for compactness and extensibility </li></ul>
  5. 5. Why QTP <ul><li>Ease of use: </li></ul><ul><ul><li>QTP allows even novice testers to be productive in minutes. You can create a test script by simply pressing a Record button and using an application to perform a typical business process. </li></ul></ul><ul><ul><li>Using the Active Screen facility, several types of checkpoints for any object to verify that components behave as expected can be created simply by clicking on that object in the Active Screen. </li></ul></ul><ul><ul><li>Data Table, an integrated spreadsheet with the full functionality of Excel, is used to manipulate data sets and create multiple test iterations, without programming, to expand test case coverage. </li></ul></ul><ul><li>QuickTest Professional supports functional testing of all popular environments, including Windows, Web, .Net, Visual Basic, ActiveX, Java, SAP, Siebel, Oracle, PeopleSoft, terminal emulators, and Web services . </li></ul>
  6. 6. Types of Testing <ul><li>Manual </li></ul><ul><ul><li>Usage of steps defined within test cases to manually test the application to ensure that it functions properly </li></ul></ul><ul><li>Automated </li></ul><ul><ul><li>Automation of the manual testing process to all unattended execution and ensure repeatability </li></ul></ul>
  7. 7. Benefits of Automated Testing <ul><li>Speed </li></ul><ul><ul><li>Automated tests are fast and can execute at a speed faster than a person can click </li></ul></ul><ul><li>Reliable </li></ul><ul><ul><li>The tests can perform the exact same steps every time without concern about human error </li></ul></ul><ul><li>Repeatable </li></ul><ul><ul><li>You run the same test against multiple builds/versions of an application </li></ul></ul><ul><li>Reusable </li></ul><ul><ul><li>Can be reused as a sub-part of different tests </li></ul></ul>
  8. 8. QTP Supported Environment/Applications <ul><li>Windows </li></ul><ul><ul><li>C++, Visual Basic, Java, .NET </li></ul></ul><ul><li>Web </li></ul><ul><ul><li>Web Applications, Web services, Flash </li></ul></ul><ul><li>Other technologies </li></ul><ul><ul><li>SAP, Siebel, Oracle, Peoplesoft, ActiveX </li></ul></ul>
  9. 9. QTP Add-ins <ul><li>When QTP is started, you should select only the add-ins for technologies that are used with your application. </li></ul><ul><li>Some of the available add-ins are </li></ul><ul><ul><li>ActiveX - For testing software written using ActiveX (also known as COM) technology. This technology allows people to create objects in one language and use those objects within other languages/applications </li></ul></ul><ul><ul><li>Visual Basic - For applications written in the Visual Basic language </li></ul></ul><ul><ul><li>Web - For testing web applications written in any language. In web applications, we interact with the application though a web browser and so the web application can be written in any language. </li></ul></ul>
  10. 10. Add-in Manager
  11. 11. Testing Process <ul><li>Create Object Repository </li></ul><ul><li>Create Tests </li></ul><ul><ul><li>Record </li></ul></ul><ul><ul><li>Edit </li></ul></ul><ul><ul><ul><li>Insert checkpoints </li></ul></ul></ul><ul><ul><ul><li>Insert synchronization points </li></ul></ul></ul><ul><ul><ul><li>Insert output values </li></ul></ul></ul><ul><ul><ul><li>Parameterize test </li></ul></ul></ul><ul><ul><ul><li>Include VBScript code </li></ul></ul></ul><ul><li>Debug test </li></ul><ul><li>Run tests </li></ul>
  12. 12. What is a QTP Test <ul><li>It is called a test script but is actually a folder containing several files </li></ul><ul><li>Broken down into subparts known as 'Actions‘ </li></ul><ul><li>Internally represented using the VBScript programming language </li></ul>
  13. 13. Overview QTP Tool <ul><li>Menus </li></ul><ul><li>Toolbar </li></ul><ul><ul><li>Provides easy access to items on the menus </li></ul></ul><ul><li>Record & Run Settings </li></ul><ul><li>Test Settings </li></ul><ul><li>Tools </li></ul>
  14. 15. QTP Tool [Code Window] <ul><li>Provides a WYSIWYG(What You See Is What You Get) </li></ul><ul><li>editor to use in writing your test script </li></ul><ul><ul><li>Keyword view </li></ul></ul><ul><ul><ul><li>Provides an icon-based representation of the code being written. This is often the easiest code view for non-programmers </li></ul></ul></ul><ul><ul><li>Expert View </li></ul></ul><ul><ul><ul><li>Provides a VBScript code based representation of the code being written. This is the most flexible code </li></ul></ul></ul>
  15. 16. QTP Tool [Views] <ul><li>Active Screen </li></ul><ul><ul><li>Provides screenshots of all objects recorded and also supports object highlighting </li></ul></ul><ul><li>Data Table </li></ul><ul><ul><li>Shows the data file that can be used to configure the application </li></ul></ul><ul><li>Debug Viewer </li></ul><ul><ul><li>Provides tools to debug code and view the value of variable/expression during code execution </li></ul></ul>
  16. 17. Keyword View
  17. 18. Expert View
  18. 19. Create the Basic Test <ul><li>Record user actions </li></ul><ul><li>Save the test </li></ul><ul><li>Verify successful playback </li></ul>
  19. 20. Record User Actions
  20. 21. Start recording on the Mercury Tours Web site. Choose Test > Record or click the Record button. The Record and Run Settings dialog box
  21. 22. In the Windows Applications tab, confirm that Record and run on these applications (opened on session start) is selected, and that there are no applications listed. <ul><li>This setting prevents you from inadvertently recording operations performed on various Windows applications (such as e-mail) during a recording session. </li></ul><ul><li>Click OK . </li></ul>
  22. 23. Recording Modes <ul><ul><li>Normal : recognizes the objects in the application irrespective of their location in the screen. </li></ul></ul><ul><ul><li>Analog : records the exact keyboard and mouse operations with respect to the screen coordinates or the application window. </li></ul></ul><ul><ul><li>Low level : records any object irrespective of support from QTP. Recognizes all run time objects as windows objects. It is used when an object is not identified by Quick test. </li></ul></ul>
  23. 24. Save the Test <ul><li>The test can be saved into a Windows file system (as below). </li></ul><ul><li>If TestDirector is available and connected with QTP, the test can be saved there. </li></ul><ul><li>QTP creates an entire structure of files and directories to support a single QuickTest script for each saved test. </li></ul>
  24. 25. Verify Successful Playback <ul><li>Use the ‘Run’ button to begin playback from the top of the test. </li></ul><ul><li>Select the location of the test results- either a new results folder or a temporary folder. </li></ul>
  25. 26. Running a Session <ul><li>The Run option can be used to run the test from start to end. </li></ul><ul><li>The Run from Step option in the Test menu is used to run the test from a selected step to the end of the current action, if running from the Expert View, or to the end of the test , if running from the Keyword View. Thus it enables us to check a specific part of the application or to confirm that a certain part of the test runs correctly. </li></ul><ul><li>The Update Run option in the Test menu is used to update the Active screens, Checkpoints and the test object descriptions. </li></ul>
  26. 27. Viewing the Test Results <ul><li>Test results can be stored in their own location (for documentation) or in a temporary location that is overwritten each time the test is run (debugging). </li></ul>
  27. 28. How QuickTest Works with Objects <ul><li>What are Object Properties? </li></ul><ul><li>A set of characteristics that defines an object’s appearance, values, state and identity in an application. </li></ul><ul><ul><li>QTP captures these object properties during recording. </li></ul></ul><ul><ul><li>Logical Name – Logical name is a value QuickTest usually takes from one of the object properties (like TEXT) to refer to the object in the recorded script. </li></ul></ul>
  28. 29. Object Repository <ul><li>What is Object Repository? </li></ul><ul><li>Object Repository is a location within the test structure where QuickTest stores object information captured during recording. </li></ul><ul><li>The Object Repository can be used to: </li></ul><ul><ul><li>Rename logical names for readability. </li></ul></ul><ul><ul><li>Add a new object in the repository. </li></ul></ul><ul><ul><li>Configure the object properties used to identify an object. </li></ul></ul>
  29. 30. Object Repository Object List Object Properties Object Name and Class
  30. 31. Object Repository <ul><li>The Object Repository can be Per Action or Shared. </li></ul><ul><li>The shared repository can be used by multiple actions of the same test or by actions from different tests. Test object properties are prone to frequent updation. </li></ul><ul><li>Per Action object repository is used by one or very few tests.Test object properties are modified less frequently. </li></ul>
  31. 32. Object Spy <ul><li>It can be used to view the properties and values of an object in any open application . Click the pointing hand to select the object in the application. The object’s properties (Test object properties and Run-Time object properties) and methods can be identified. The object’s hierarchy tree is also displayed. To perform other events such as mouse clicks or window focus hold the CTRL key. </li></ul>
  32. 34. Object Identification
  33. 35. Synchronization <ul><li>WHAT IS SYNCHRONIZATION ? </li></ul><ul><li>Synchronization refers to adding a step in the script that instructs Quick Test to wait for a particular object before proceeding to the next step during playback. </li></ul><ul><li>When do you need SYNCHRONIZATION ? </li></ul><ul><li>When you observe that the application takes a longer time to process information sent or respond to a client request, add a synchronization step while recording. For example: </li></ul><ul><li>- A progress bar to reach 100%. </li></ul><ul><li>- A button to become enabled. </li></ul><ul><li>- A window or pop-up message to open. </li></ul>
  34. 36. How to ADD Synchronization <ul><li>Synchronization can be added ONLY during recording. </li></ul><ul><li>Identify the object to be synchronized. </li></ul><ul><li>Navigate to the window where the object is located. </li></ul><ul><li>Locate the step in the test that corresponds to the object. </li></ul><ul><li>Start recording and add the synchronization point. </li></ul>
  35. 37. Two ways to set Synchronization <ul><li>Global synchronization value for all Objects. Instructs Quick Test to wait for all the objects for a specific amount of time. </li></ul><ul><li>Synchronization of a specific Object. </li></ul><ul><li> Instructs Quick Test to wait for a specific object only. </li></ul>
  36. 38. Global synchronization value for all Objects <ul><li>Menu  Test  Settings  Run </li></ul><ul><li>For every object in the test, Quick Test can wait a maximum number of milliseconds specified in the settings </li></ul>
  37. 39. Synchronization of a Specific Object <ul><li>Menu  Insert  Step  Synchronization Point </li></ul><ul><li>Quick Test shall pause the test until the object property achieves the value specified here (or until the specific timeout amount is exceeded). </li></ul><ul><li>Quick Test uses one of the object’s properties as the waiting criteria. E.g. ‘Text’ property for window, ‘Label’ property for buttons etc. </li></ul>
  38. 40. Checkpoints In QTP <ul><li>A checkpoint is a verification point that compares a current value for a specified property with the expected value for that property. </li></ul>
  39. 41. Types Of Checkpoints <ul><li>Standard Checkpoint </li></ul><ul><li>Bitmap checkpoint </li></ul><ul><li>Text checkpoint </li></ul><ul><li>Text Area checkpoint </li></ul><ul><li>Database checkpoint </li></ul><ul><li>XML Checkpoint </li></ul>
  40. 42. Types and Their Use <ul><li>Standard Checkpoint </li></ul><ul><li>Bitmap Checkpoint </li></ul><ul><li>Checks the property value of the object in an application or Webpage. It checks buttons,Radiobuttons,Comboboxes etc </li></ul><ul><li>Checks the value of an image in the application. </li></ul>
  41. 43. <ul><li>Text Checkpoint </li></ul><ul><li>Checks whether the text string is displayed in the appropriate place in your application or on a Web page </li></ul>
  42. 44. <ul><li>Database Checkpoint </li></ul><ul><li>XML Checkpoint </li></ul><ul><li>Checks the contents of a database accessed by the application </li></ul><ul><li>Checks the data content of XML documents in the application. </li></ul>
  43. 45. When to Use Checkpoints <ul><li>Before creating checkpoints on web objects we have to select web-test option in ADD-IN Manager. </li></ul><ul><li>If the objects developed in HTML we can use Standard Check point. </li></ul><ul><li>If the Objects developed in XML we can use XML Check point. </li></ul>
  44. 46. How Checkpoints Work - Playback <ul><li>Script Expected Result </li></ul>Execute checkpoint Object: Button Logical Name : OK Property: Enabled Value: True Actual = expected ? Test Results PASS
  45. 47. Sample Objects that QuickTest can Verify <ul><li> </li></ul>Web Element Tables/ Grids Radio Button Text Area Checkbox Status Bar Drop down list Windows Object Edit Field Checkbox Image Link Radio Button Images Menu command Text Link Drop down list Text Area Edit Field Browser Window WEB WINDOWS
  46. 48. How to Add a Checkpoint <ul><li>Select the object in the Active Screen </li></ul><ul><li>Right Click on it and Select ‘Insert Standard Checkpoint’ or Menu  Insert  Checkpoint  Standard Checkpoint </li></ul>
  47. 49. How to Add a Checkpoint… set expected value <ul><li>Do not automatically select the pre-defined list of properties to check. </li></ul><ul><li>Scroll down the property list to find the property( or properties) that best meets the test requirement. </li></ul>
  48. 50. Table Checkpoint
  49. 52. Database Checkpoint <ul><li>Choose Insert > Checkpoint > Database Checkpoint . The Database Query Wizard opens . </li></ul>
  50. 53. Database Checkpoint ..contd
  51. 55. How to Add a Checkpoint… Test Result
  52. 56. Output Values <ul><li>Output Value is used to retrieve the current value of any object in the application and stores it in a specified location. </li></ul>
  53. 57. Navigation <ul><li>Insert </li></ul><ul><li>Output Value </li></ul><ul><li> Select the type of output value. </li></ul><ul><li>Right click the object in the Active screen and select the type of output value to be added </li></ul>
  54. 58. Types of Output Values <ul><li>Standard Output Values </li></ul><ul><li>Text Output Values </li></ul><ul><li>To output the property values of most objects like editbox,button,radio button,list box,etc. </li></ul><ul><li>To output text strings displayed in the application </li></ul>
  55. 59. <ul><li>Text Area Output Values </li></ul><ul><li>Database Output Values </li></ul><ul><li>XML Output Values </li></ul><ul><li>To output text strings displayed within a defined area of the application </li></ul><ul><li>To output the contents of database cells, based on the results of a query on the database. </li></ul><ul><li>To output the values of XML elements and attributes in XML documents </li></ul>
  56. 60. How to use Output Value Select the output to be considered Select the Property
  57. 61. How to use Output Value…Contd. Output Value
  58. 62. Parameterization <ul><li>A parameter is a variable that is assigned a value from an external data source at run time. We use parameterization when we want to change the value of properties at run time . </li></ul>
  59. 63. Types of Parameterization <ul><li>Parameterization can be done in three ways using Quick Test. </li></ul><ul><li>Datatable </li></ul><ul><li>Environment variables </li></ul><ul><li>Random numbers </li></ul>
  60. 64. DataTable Parameters <ul><li>The Test runs once for each line of data in the DataTable. Each iteration takes a different value from the datatable. </li></ul><ul><li>choose the Run tab </li></ul><ul><li>Test </li></ul><ul><li>Settings </li></ul><ul><li>Specify an option in the Datatable iterations frame. </li></ul>
  61. 65. Environment variable Parameters <ul><li>The Environment variables can have Quick Test generated values or values supplied from external files. </li></ul><ul><li>Test </li></ul><ul><li>Settings </li></ul><ul><li>Environment </li></ul><ul><li>Choose User-defined from the variable type </li></ul><ul><li>Click New to create your own internal variables </li></ul>
  62. 66. Random number Parameters <ul><li>It enables us to use random numbers as values in the test. We can specify the range from which the random number is generated. By default, the random number range is between 0 and 100 . </li></ul>
  63. 67. How to Parameterize an Input Value <ul><li>Select the step in the Tree View that contains the recorded input value. </li></ul><ul><li>Click on the text under Value column. </li></ul>
  64. 68. How to Parameterize an Input Value… contd. -Select the source for paramterization. -Select the parameter name. -Select the data sheet to use.
  65. 69. How to Parameterize an Input Value…contd
  66. 70. Actions <ul><li>A test is composed of actions or logical sections. The steps we add to the test are added within the test’s actions. By default, each test begins with a single action . </li></ul><ul><li>When we run a test with multiple actions, the Test Results are divided by actions so that we can view the detailed results for each action individually. </li></ul>
  67. 71. <ul><li>Each action has its own sheet in the Data Table so that we can insert data that applies only to that action. </li></ul><ul><li>Actions can be of three types: </li></ul><ul><li>Non-re-usable: Action can be used in the local test, only once. </li></ul><ul><li>Reusable: Action can be used in the local test, multiple times. </li></ul>
  68. 72. <ul><li>External: These are reusable actions created in another test. This can be of two types. If a call to an external action is used the action is read only in the calling test. But, any existing action can be inserted as a copy of the original action. In this case, we can modify this copy of the external action in the calling test. </li></ul>
  69. 73. <ul><li>Actions on Quick Test Window (Keyword View): </li></ul><ul><li>Actions Tool Bar contains buttons and a list of actions, enabling us to view the details of an individual action or the entire test flow. The test flow displays the overall flow of the test with all the actions in the test. </li></ul>
  70. 75. How to set an Action as Reusable
  71. 76. How to Call a Reusable Action Insert  Call to existing Action
  72. 77. Recovery Scenario Manager <ul><li>The recovery scenario manager is used to : </li></ul><ul><li>defining the trigger event that interrupts the run session </li></ul><ul><li>specifying the recovery operation(s) required to continue </li></ul><ul><li>choosing a post-recovery test run operation </li></ul><ul><li>specifying a name and description for the recovery scenario </li></ul><ul><li>specifying whether to associate the recovery scenario to the current test and/or to all new tests. </li></ul>
  73. 79. Components of a Recovery Scenario The event that interrupts the test run (e.g. a pop up screen or run error) The operation that needs to be performed in order to continue running the test. The instructions on how the test should proceed once the recovery operation is performed.
  74. 80. Steps to add a Recovery Scenario…contd After clicking on HAND, select the message/ error window. The click on Next.
  75. 81. Steps to add a Recovery Scenario…contd
  76. 82. Steps to add a Recovery Scenario…contd After clicking on HAND, select the OK button in the Error/Message window.
  77. 83. Steps to add a Recovery Scenario…contd
  78. 84. Steps to add a Recovery Scenario…contd Give a name and description to the recovery scenario
  79. 85. Steps to add a Recovery Scenario…contd
  80. 86. Script Development with QTP
  81. 87. Concepts Thank You

×