Qtp Training


Published on

Published in: Technology
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Qtp Training

  1. 1. Quick Test Professional Presenter
  2. 2. Introduction to Automation Testing <ul><li>What is Automation Testing ? </li></ul><ul><li>Benefits </li></ul><ul><li>Automation Testing Process </li></ul>
  3. 3. QTP Testing Process <ul><li>Quick Test testing process consists of 7 main phases </li></ul><ul><li>Preparing to record </li></ul><ul><ul><li>Test Environment </li></ul></ul><ul><ul><li>Test Conditions </li></ul></ul><ul><li>Recording a session on your application </li></ul><ul><ul><li>Navigate according to Test Conditions </li></ul></ul><ul><li>Enhancing your test </li></ul><ul><ul><li>Adding logic and conditional statements </li></ul></ul><ul><ul><li>Parameterization </li></ul></ul><ul><ul><li>Inserting checkpoints </li></ul></ul><ul><li>Debugging your test </li></ul><ul><ul><li>Check that it operates smoothly and without interruption . </li></ul></ul>
  4. 4. QTP Testing Process <ul><li>Run Test </li></ul><ul><ul><li>Check the behavior of your application </li></ul></ul><ul><li>Analyzing the test results </li></ul><ul><li>Reporting defects </li></ul>
  5. 5. QTP Layered Architecture Logical name Physical Description Application Layer1 Layer2 Layer3
  6. 6. QTP Window Expert Debugger
  7. 7. Tree and Expert View Relation <ul><li>Test Objects hierarchy can be seen in both the TreeView and the Expert View </li></ul>
  8. 8. Object Spy <ul><li>It is used to view object properties and Methods </li></ul><ul><li>Displays </li></ul><ul><ul><li>Object hierarchy tree </li></ul></ul><ul><ul><li>Run-time object methods </li></ul></ul><ul><ul><li>or test object methods </li></ul></ul>
  9. 9. Object Repository <ul><li>Interface between QTP Script and the Application </li></ul><ul><li>Contains Logical Name and physical Description </li></ul>Locate object in repository Find data-dependant property <ul><li>Parameterize </li></ul><ul><li>property’s </li></ul><ul><li>value </li></ul>
  10. 10. Recording Modes <ul><li>Normal recording </li></ul><ul><ul><li>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. </li></ul></ul><ul><li>Analog Recording </li></ul><ul><ul><li>Record the exact mouse and keyboard operations you perform in relation to either the screen or the application window. </li></ul></ul><ul><li>Low-Level Recording </li></ul><ul><ul><li>Record on any object in your application, whether or not Quick Test recognizes the specific object or the specific operation. </li></ul></ul>
  11. 11. Enhancing Tests <ul><li>Parameterizing Test </li></ul><ul><li>Regular Expressions </li></ul><ul><li>Creating Checkpoints </li></ul><ul><li>Creating Output Values </li></ul><ul><li>Dividing Tests into Multiple Actions </li></ul>
  12. 12. Parameterizing Tests To run the scenario with multiple sets of data. <ul><li>Steps for Parameterization </li></ul><ul><li>Defining a Data Table Parameter </li></ul><ul><li>Adding Parameter Values to a Data Table </li></ul><ul><li>Modifying Steps Affected by Parameterization </li></ul><ul><li>Running and Analyzing a Parameterized Test </li></ul>Demo………………..
  13. 13. Demo………….. <ul><li>How to provide the data to the respective Parameter through Tree View </li></ul>
  14. 14. Demo………….. How to provide the data to the respective Parameter through Expert View
  15. 15. Regular Expressions <ul><li>Regular expressions enable Quick Test to identify Objects and text strings with varying values. </li></ul><ul><li>User has to identify the data projected to be change, like dates, so to accepts any dates, user can use regular expression. </li></ul><ul><li>Example : </li></ul><ul><li>Actual Date format : </li></ul><ul><li>05/19/2004 (mm/dd/yyyy) </li></ul><ul><li>After Regular Expression: </li></ul><ul><li>[0-1][0-9]/[0-3][0-9]/200[0-9] </li></ul>
  16. 16. Demo……
  17. 17. Demo…….. Click icon Do the changes as, shown below and select Regular Expression. QTP will take the year from 2000 -2009
  18. 18. Checkpoints <ul><li>Used to check the current behavior of the application with the expected behavior. </li></ul><ul><li>Text /Text Area Checkpoint </li></ul><ul><li>Standard Checkpoint </li></ul><ul><li>Table Checkpoint </li></ul><ul><li>Page checkpoint </li></ul><ul><li>Database Checkpoint </li></ul><ul><li>Image Checkpoint </li></ul><ul><li>Accessibility Checkpoint </li></ul><ul><li>Bitmap Checkpoint </li></ul><ul><li>XML Checkpoint </li></ul>
  19. 19. Text /TextArea Checkpoint <ul><li>checks that Current Text format with the Expected Text Format in a Web page or application window </li></ul>
  20. 20. Standard Checkpoint <ul><li>Checks values of an object’s properties </li></ul>
  21. 21. Table Checkpoint <ul><li>Checks information in a table </li></ul>
  22. 22. Page checkpoint <ul><li>Checks the characteristics of a page </li></ul><ul><li>Check how long a Web page takes to load or if a Web page contains broken links. </li></ul>
  23. 23. Page checkpoint
  24. 24. Database Checkpoint <ul><li>Used to check current Database data with the Expected Database data. </li></ul><ul><li>Check that the value in a database query is correct. </li></ul><ul><li>Demo……… </li></ul>
  25. 25. Bitmap Checkpoint <ul><li>Checks an area of a Web page or application after capturing it as a bitmap </li></ul><ul><li>Check that a Web page (or any portion of it) is displayed as expected. </li></ul><ul><li>Demo…………. </li></ul>
  26. 26. Bitmap Checkpoint
  27. 27. XML Checkpoint <ul><li>Checks the data content of XML documents </li></ul><ul><li>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. </li></ul><ul><li>Demo…………. </li></ul>
  28. 28. XML Checkpoint XMLFile( &quot;Poem.xsl&quot; ).Check CheckPoint( &quot;Poem.xsl_2&quot; )
  29. 29. Accessibility Checkpoint Browser( &quot;Browser&quot; ).Page( &quot;Yahoo! Mail_4&quot; ).Check CheckPoint( &quot;Yahoo! Mail_4&quot; ) Check if the images on a Web page include ALT properties, required by the W3C Web Content Accessibility Guidelines
  30. 30. Creating Output Values <ul><li>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. </li></ul>
  31. 31. Creating Output Values Window( &quot; Flight Reservation&quot; ).WinEdit( &quot;Name:&quot; ).Output CheckPoint ( &quot;Name:_3&quot; )
  32. 32. Actions <ul><li>Actions help to divide Test Script into logical units </li></ul><ul><li>Usage : </li></ul><ul><ul><li>1)We can design more modular and efficient tests. </li></ul></ul><ul><li> 2)Actions enable you to parameterize specific components of a test </li></ul><ul><li> 3)Two or more tests can call the same action </li></ul><ul><li> 4)Complex tests may have many actions and may share actions with </li></ul><ul><li>other tests. </li></ul><ul><li>Example: </li></ul>
  33. 33. Actions <ul><li>We can divide Test Script into multiple actions by creating </li></ul><ul><li>new actions or by inserting existing actions. </li></ul><ul><li>Kinds of actions: </li></ul><ul><li>Non-Reusable Action : An action that can be used only in the test in which it was created, and only once. </li></ul><ul><li>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. </li></ul><ul><li>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. </li></ul>
  34. 34. Creating New Actions <ul><li>We can add new actions to Test Script during a recording session or while designing Test Script. </li></ul>
  35. 35. Splitting Actions <ul><li>We can split an existing action into two sibling actions or into parent-child nested actions. </li></ul><ul><li>We cannot split an action and the option is disabled </li></ul><ul><li>when an external action is selected </li></ul><ul><li>when the first line of the action is selected </li></ul><ul><li>while recording a test </li></ul><ul><li>while running a test </li></ul><ul><li>when you are working with a read-only test </li></ul>
  36. 36. Splitting Actions
  37. 37. Inserting Existing Actions <ul><li>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. </li></ul><ul><li>Example: </li></ul>
  38. 38. Inserting Existing Actions <ul><li>Copy of Action : It copied in its entirety, including checkpoints, parameterization, and the corresponding action tab in the Data Table. </li></ul>
  39. 39. Inserting Existing Actions <ul><li>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). </li></ul>Tree View Expert View
  40. 40. Setting Action Properties <ul><li>The Action Properties enables to modify an action name, add or modify an action description, and set an action as reusable. </li></ul>
  41. 41. Transactions <ul><li>A transaction represents the business process that you are interested in measuring </li></ul><ul><li>You can measure how long it takes to run a section of your test by defining transactions . </li></ul><ul><li>User can Plan the Scenario as transaction and use the Start Transaction and End Transaction while Recording. </li></ul>
  42. 42. Transactions Services.StartTransaction &quot;Start&quot; Services.EndTransaction &quot;Start&quot;
  43. 43. Results <ul><li>After running a test, we can view a report of major events that occurred during the test run. </li></ul><ul><li>The Test Results window contains a description of the steps performed during the test run. </li></ul><ul><li>If the test contains Data Table parameters, and the test settings it shows on Test Results window. </li></ul><ul><li>Results are grouped by the actions in the test. </li></ul>
  44. 44. Results Reporter.ReportEvent micPass, &quot;Step Name&quot; , &quot;Log in successfully&quot; Reporter.ReportEvent micFail, &quot;Step Name&quot; , &quot;Log in Failed&quot; Reporter.ReportEvent micWarning, &quot;Step Name&quot; , &quot;Log in pending&quot; Reporter.ReportEvent micDone, &quot;Step Name&quot; , &quot;Log in pending&quot;
  45. 45. Integration with Test Director <ul><li>By this integration we will store Test Case in to Test Director and execute remotely. </li></ul>
  46. 46. Integration with WinRunner <ul><li>By this we will execute WinRunner script from the QuickTest </li></ul><ul><ul><li>Call to WinRunner test </li></ul></ul><ul><ul><li>Call to WinRunner Function </li></ul></ul>
  47. 47. Virtual Objects <ul><li>QTP teaches to recognize a bitmap area as a standard object except edit. </li></ul>