Qtp Basics


Published on

Published in: Technology
  • Hi All, We are planning to start new Salesforce Online batch on this week... If any one interested to attend the demo please register in our website... For this batch we are also provide everyday recorded sessions with Materials. For more information feel free to contact us : siva@keylabstraining.com. For Course Content and Recorded Demo Click Here: http://www.keylabstraining.com/salesforce-online-training-hyderabad-bangalore
    Are you sure you want to  Yes  No
    Your message goes here
  • @Gokul Nathan how can it download
    Are you sure you want to  Yes  No
    Your message goes here
  • @anandsangeetha if u have please send me to kumarphp60@gmail.com
    Are you sure you want to  Yes  No
    Your message goes here
  • hi, can you please send me a copy: kumarphp60@gmail.com
    Are you sure you want to  Yes  No
    Your message goes here
  • hi, can you please send me a copy: luuthiloc1910@gmail.com
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Qtp Basics

  1. 1. Automation Fundamental Concepts & QTP 8.2
  2. 2. Automation Fundamental Concepts <ul><li>What is Test Automation ? </li></ul><ul><ul><li>Software Test Automation is the process of automating the steps of manual test cases using an automation tool Or utility to shorten the testing life cycle with respect to time… </li></ul></ul><ul><ul><li>When application undergoes regression, some of the steps might be missed out or skipped which can be avoided in Automation… </li></ul></ul><ul><ul><li>Automation helps to avoid human errors and also expedite the testing process… </li></ul></ul><ul><ul><li>To implement the Test Automation detailed planning and effort is required </li></ul></ul>
  3. 3. Automation Fundamental Concepts <ul><ul><li>Automation saves time and effort which results in reduction of the Test life cycle… </li></ul></ul><ul><ul><li>Benefits of Automation </li></ul></ul><ul><ul><li>- Consistency of Test Execution </li></ul></ul><ul><ul><li>- Reducing cycle time of regression test cycles </li></ul></ul><ul><ul><li>- Data driven testing </li></ul></ul><ul><ul><li>- Repeatability </li></ul></ul><ul><ul><li>- Coverage </li></ul></ul><ul><ul><li>- Reliability </li></ul></ul><ul><ul><li>- Reusability of test wares </li></ul></ul>
  4. 4. Automation Fundamental Concepts <ul><li>Automation life cycle is a subset of the entire test life cycle… </li></ul><ul><li>Automation planning can be initiated in parallel to the test planning phase… </li></ul><ul><li>Factors to be considered in automation planning , </li></ul><ul><ul><li>Stability of AUT (Application under test) </li></ul></ul><ul><ul><li>No of regression cycles to be performed </li></ul></ul><ul><ul><li>Compatibility of App platform with testing tools </li></ul></ul><ul><ul><li>Cost benefit analysis (ROI) </li></ul></ul><ul><ul><li>Availability of skilled resources </li></ul></ul>
  5. 5. Regression Testing & Automation <ul><li>When Automation is applicable? </li></ul><ul><ul><li>Regression Testing Cycles are long and iterative. </li></ul></ul><ul><ul><li>If the application is planned to have multiple releases / builds </li></ul></ul><ul><ul><li>If it’s a long running application where in small enhancements / Bug Fixes keeps happening </li></ul></ul><ul><ul><li>Test Repeatability is required </li></ul></ul>
  6. 6. QTP At a Glance ….. <ul><li>Introduction to QTP (QuickTest Professional) “The Mercury advanced keyword-driven testing solution” Technologies Supported Default Support 1. Standard Windows applications 2. Web objects / Applications 3. ActiveX controls 4. Visual Basic applications Additional QuickTest add-ins Support, 1. Java 2. Oracle 3. SAP Solutions, 4. .NET Windows 5. Web Forms, 6. Siebel, 7. PeopleSoft, 8. Web services, and terminal emulator applications . </li></ul>
  7. 7. Testing Process with QTP <ul><li>Quick Test Pro involves 3 main stages </li></ul><ul><li> Creating Test scripts </li></ul><ul><li> Running Tests </li></ul><ul><li> Analyzing Test Results </li></ul>
  8. 8. Testing Process with QTP <ul><li>Creating Tests </li></ul><ul><li>Create a test script by recording a manual test scenario on the AUT (Application Under Test) using QTP. </li></ul><ul><li>Quick Test Pro graphically displays each step users perform in the form of a collapsible, icon based tree view in QTP’s Keyword View. </li></ul>
  9. 9. Testing Process with QTP <ul><li>Running Tests & Analyzing Test Results </li></ul><ul><li>Running Tests : </li></ul><ul><ul><li>Once the test scripts are recorded / created, next step is to execute them…While running (executing) the tests Quick Test Pro connects to the web site or AUT and performs each operation in the test as performed manually while recording / creating tests (test scripts)… </li></ul></ul><ul><li>Debugging Test : To identify and eliminate the defects in the test scripts. </li></ul><ul><li>Analyzing Test Results : </li></ul><ul><li>Once the test scripts are executed, test results and the summary can be viewed for result analysis. </li></ul>
  10. 10. Add-in Manager <ul><li>Default Add-ins </li></ul><ul><ul><li>ActiveX </li></ul></ul><ul><ul><li>Visual basic </li></ul></ul><ul><ul><li>Web </li></ul></ul><ul><li>Other Add-Ins </li></ul><ul><ul><li>Siebel </li></ul></ul><ul><ul><li>Java </li></ul></ul><ul><ul><li>SAP </li></ul></ul><ul><ul><li>Oracle </li></ul></ul><ul><ul><li>.Net and many more </li></ul></ul>
  11. 11. Add-in Manager Cont… <ul><li>QTP’s Add-in Manager facilitates the users to select the technology / environment from variety of environments suitable for the AUT (Application Under Test) </li></ul><ul><li>Once an add-in is loaded, users can record that application in its supported environment and thus QTP recognizes the objects specific to the application under test (AUT) as loaded through Add-in Manager. </li></ul><ul><li>It is critical for the users to know the development technologies / environment of AUT, and load right Add-Ins while invoking Quick Test Pro. </li></ul>
  12. 12. Quick Test Professional - Record & Run Modes <ul><li>Recording Modes </li></ul><ul><ul><li>Normal </li></ul></ul><ul><ul><li>Analog </li></ul></ul><ul><ul><li>Low level </li></ul></ul><ul><li>Run Modes </li></ul><ul><ul><li>Normal </li></ul></ul><ul><ul><li>Fast </li></ul></ul><ul><ul><li>Update </li></ul></ul>
  13. 13. Quick Test Professional - Options  General <ul><li>Best Practices for General Options: </li></ul><ul><ul><li>Deselect all check boxes except “Save data for integrating with performance testing …” and “Display Add-in Manager on startup” which is default setting. </li></ul></ul><ul><ul><li>Click on “Restore Layout” button to reset screens to the initial setting when QuickTest was first installed. </li></ul></ul>
  14. 14. Quick Test Professional - Options  Run
  15. 15. Quick Test Professional - Options  Run <ul><li>Best Practices for Options for Run Mode: </li></ul><ul><ul><li>Run Mode as Normal: </li></ul></ul><ul><ul><ul><li>This ensures that the execution arrow appears to help with trouble shooting the tests. </li></ul></ul></ul><ul><ul><ul><li>Synchronization becomes better for the AUT (Application Under Test) </li></ul></ul></ul><ul><ul><li>Test Results: </li></ul></ul><ul><ul><ul><li>Deselect the option “View Results when run session ends” </li></ul></ul></ul><ul><ul><li>Mercury Tool Integration: </li></ul></ul><ul><ul><ul><li>Select &quot;Allow other Mercury products to run tests and components“ </li></ul></ul></ul><ul><ul><li>Screen Capture: </li></ul></ul><ul><ul><ul><li>Save step screen capture to results &quot;On error and warnings&quot; </li></ul></ul></ul>
  16. 16. Record and Run Settings
  17. 17. Record and Run Settings <ul><li>Best Practices for Record & Run Settings, </li></ul><ul><ul><li>Set the options to configure QTP to &quot;Record and run test on any open Windows- based application“ </li></ul></ul><ul><ul><li>Set the option - This window will appear the first time you click on the Record button in the new test. </li></ul></ul><ul><ul><li>Manually recall this window by selecting Test  Record and Run settings </li></ul></ul>
  18. 18. QTP - Main Window
  19. 19. QTP - Main Window
  20. 20. QTP - Main Window <ul><li>Test Pane: </li></ul><ul><ul><li>Test Pane contains two labs to view the tests, </li></ul></ul><ul><ul><ul><li>Keyword View </li></ul></ul></ul><ul><ul><ul><li>Expert View </li></ul></ul></ul><ul><ul><li>Keyword View: </li></ul></ul><ul><ul><ul><li>Quick Test Pro displays your test in the form of a collapsible, icon based tree… </li></ul></ul></ul><ul><ul><li>Expert View: </li></ul></ul><ul><ul><ul><li>Quick Test Pro displays the source code (VB Script) of the tests in this view. </li></ul></ul></ul>
  21. 21. QTP - Main Window
  22. 22. QTP - Main Window <ul><li>Data Table : </li></ul><ul><li>Data table assists in Parameterizing the tests… </li></ul><ul><li>Debug Viewer Pane : </li></ul><ul><li>It assists in debugging tests with the help of </li></ul><ul><li>Watch Expressions, Variables, and Command. </li></ul>
  23. 23. Quick Test Pro Commands <ul><li>Quick Test Pro Commands : </li></ul><ul><li>The Quick Test Pro commands can be chosen from the menu bar or from a Tool bar. </li></ul><ul><li>File Tool bar : </li></ul><ul><li>File tool bar contains buttons for managing the test. </li></ul>
  24. 24. Quick Test Pro Commands <ul><li>Test Tool bar : </li></ul><ul><li>Test tool bar contains buttons for the commands used when creating or maintaining the tests… </li></ul>
  25. 25. Quick Test Pro Commands <ul><li>Debug Tool Bar : </li></ul><ul><li>It contains buttons for commands used when debugging the steps in the tests… </li></ul>
  26. 26. Quick Test Pro Commands <ul><li>Action Tool Bar : </li></ul><ul><li> To view all actions in the test flow or to view the details of a selected action… </li></ul>
  27. 27. Working with Test Objects in QTP <ul><li>Test Object Model Conceptualization </li></ul><ul><li>Applying the Test Object Model Concept </li></ul><ul><li>Viewing Object properties Using Object Spy </li></ul><ul><li>Demo on Test Object Model features of QTP </li></ul>
  28. 28. Test Object Model Cont… <ul><li>How Quick test Pro learns objects in application ? </li></ul><ul><li>Quick Test first looks at the object on which user is recording and stores it as a test object & then determines which test object class it fits into by, </li></ul><ul><li>Mandatory properties </li></ul><ul><li>Assistive properties.. </li></ul><ul><li>Ordinal identifier…… </li></ul><ul><li>Smart Identification.. </li></ul>
  29. 29. Test Object Model Cont… <ul><li>Mandatory properties: </li></ul><ul><li>For each Test Object class, Quick Test has list of mandatory properties… </li></ul><ul><li>Assistive properties: </li></ul><ul><li>Quick Test adds assistive properties one by one to the description until it has compiled a unique description… </li></ul><ul><li>Ordinal identifier: </li></ul><ul><li>If the combination of all defined mandatory and assistive properties is not sufficient to create a unique test object description, Quickest also records the value for the selected ordinal identifier. </li></ul><ul><li>Smart Identification: </li></ul><ul><li>A Smart Identification definition can help QuickTest identify an object, if it is present, even when the recorded description fails due to changes in one or more property values. </li></ul>
  30. 30. Test Object Model <ul><li>How Quick Test Identifies objects during the test run? </li></ul><ul><li>Quick test searches for a run time object that exactly matches the description of the test object from the object repository it learned while recording… </li></ul>
  31. 31. Test Object Model <ul><li>Test Object : </li></ul><ul><li> Test Object is an object that Quick Test creates in the test to represent the actual object in the application… </li></ul><ul><li>Run Time Object : </li></ul><ul><li>It is the actual object in the web site or application on which methods are performed during the test run.. </li></ul>
  32. 32. Test Object Model <ul><li>Viewing object properties by Object Spy : </li></ul><ul><li>Using the object spy, users can view the properties of any object in an open application… </li></ul>
  33. 33. Object Spy
  34. 34. Test Object Model <ul><li>Viewing object methods and methods syntax using object spy… </li></ul><ul><li>Object Spy enables users to view both the run time object methods, the test object methods associated with an object and to view the syntax for a selected method… </li></ul>
  35. 35. Managing Test objects <ul><li>Object Repository Dialog box : </li></ul><ul><li>- Per Action Mode </li></ul><ul><li> - Shared Action Mode </li></ul>
  36. 36. Managing Test objects <ul><li>Identifying the Object : </li></ul><ul><li> - Logical Name </li></ul><ul><li> - Class </li></ul><ul><li>Viewing the Objects Property : </li></ul><ul><ul><li>Type - Constant, Data table property ,variable parameter. </li></ul></ul><ul><ul><li>Property - Name of the Property </li></ul></ul><ul><ul><li>Value - The value of the property </li></ul></ul><ul><ul><li>- Smart Identifier </li></ul></ul><ul><ul><li>- Add/ Remove </li></ul></ul>
  37. 37. Managing Test Objects <ul><li>Adding or Viewing New objects : </li></ul><ul><li>- Add New Objects </li></ul><ul><li> - Object spy </li></ul><ul><li>- Saves all the object properties and values from a per action object repository to a separate file for use as a shared object repository in another test… </li></ul><ul><li>- Modify the Test object properties </li></ul><ul><li>- Finding the Test object properties </li></ul><ul><li>- Modifying the Logical Names </li></ul>
  38. 38. Managing Test Objects <ul><li>Object Properties Modification </li></ul><ul><li>Users can modify the properties of the temporary version of the object during the test run with out affecting the permanent values in the object repository </li></ul><ul><li>- SetTOProperty </li></ul><ul><li>- GetTOProperty </li></ul>
  39. 39. Main phases of QTP testing Process <ul><li>Preparing to record </li></ul><ul><li>Recording a session on the application </li></ul><ul><li>Executing the test </li></ul><ul><li>Enhancing your test </li></ul><ul><li>Debugging your test </li></ul><ul><li>Re-executing the tests on a new version of the application </li></ul><ul><li>Analyzing the test results </li></ul><ul><li>Reporting defects </li></ul>
  40. 40. DEMO <ul><li>Please record a test and run the script. </li></ul><ul><li>Analyze the test result. </li></ul>
  41. 41. Types of Checkpoints (Verification Process) Check that a Web page (or any portion of it) is displayed as expected. Checks an area of a Web page or application after capturing it as a bitmap Bitmap Checkpoint Check whether the expected text string is displayed in the expected location on a Web page or dialog box Checks that a text string is displayed in the appropriate place in a Web page or application window Text / Text Area Checkpoint Check how long a Web page takes to load or if a Web page contains broken links. Checks the characteristics of a Web page Page checkpoint Check that the value in a table cell is correct. Checks information in a table Table Checkpoint Check that the image source file is correct. Checks the property values of an image Image Checkpoint Check that a radio button is selected. Checks values of an object’s properties Standard Checkpoint
  42. 42. Types of Checkpoints Cont… Note: 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. Checks the data content of XML documents XML Checkpoint Check if the images on a Web page include ALT properties, required by the W3C Web Content Accessibility Guidelines. Identifies areas of a Web site to check for Section 508 compliancy Accessibility Checkpoint Check that the value in a database query is correct. Checks the contents of databases accessed by an application or Web site Database Checkpoint
  43. 43. Demo on using checkpoints <ul><li>Apply different types of checkpoints to the recorded test. </li></ul><ul><li>Analyze the test results </li></ul>
  44. 44. Parameterising Tests <ul><li>Different Types of Parameters </li></ul><ul><ul><li>Test & Action Parameters </li></ul></ul><ul><ul><li>Data Table </li></ul></ul><ul><ul><li>Environment Variable </li></ul></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>
  45. 45. Creating Output Values <ul><li>Creating an Output Value </li></ul><ul><li>Running and Analyzing a Test with Output Values </li></ul>
  46. 46. Using Regular Expressions <ul><li>Regular Expression Syntax </li></ul><ul><li>Working with Regular Expressions </li></ul><ul><li>Running and Analyzing a Test with Regular Expressions </li></ul>
  47. 47. Dividing Tests into Multiple Actions <ul><li>Working with Multiple Actions </li></ul><ul><li>Creating New Actions </li></ul><ul><li>Inserting Existing Actions </li></ul><ul><li>Parameterizing an Action </li></ul><ul><li>Running and Analyzing a Multi-action Test </li></ul><ul><li>Different Types of Actions </li></ul>
  48. 48. Recovery Scenarios <ul><li>Defining Recovery Scenarios </li></ul><ul><li>Creating a Recovery File </li></ul><ul><li>Understanding the Recovery Scenario Manager Dialog Box </li></ul><ul><li>Understanding the Recovery Scenario Wizard </li></ul><ul><li>Welcome to the Recovery Scenario Wizard Screen </li></ul>
  49. 49. Recovery Scenario <ul><li>Welcome to the Recovery Scenario Wizard Screen </li></ul><ul><li>Select Trigger Event Screen </li></ul><ul><li>Specify Pop-up Window Conditions Screen </li></ul><ul><li>Select Object Screen </li></ul><ul><li>Set Object Properties and Values Screen </li></ul><ul><li>Select Test Run Error Screen </li></ul>
  50. 50. Recovery Scenario <ul><li>Select Processes Screen </li></ul><ul><li>Recovery Operations Screen </li></ul><ul><li>Recovery Operation Screen </li></ul><ul><li>Recovery Operation – Click Button or Press Key Screen </li></ul><ul><li>Recovery Operation – Close Processes Screen </li></ul><ul><li>Recovery Operation – Function Call Screen </li></ul>
  51. 51. Recovery Scenario <ul><li>Post-Recovery Test Run Options Screen </li></ul><ul><li>Name and Description Screen </li></ul><ul><li>Completing the Recovery Scenario Wizard Screen </li></ul><ul><li>Saving the Recovery Scenario in a Recovery File </li></ul><ul><li>Managing Recovery Scenarios </li></ul>
  52. 52. <ul><li>Thank You </li></ul>