Ppt Qtp


Published on


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

No notes for slide

Ppt Qtp

  1. 1. Quick Test Professional 9.2
  2. 2. Testing Process <ul><li>Preparing to Record </li></ul><ul><li>Recording </li></ul><ul><li>Enhancing a Test </li></ul><ul><li>Debugging </li></ul><ul><li>Running the Test and Analyzing the Results </li></ul><ul><li>Reporting Defects </li></ul>
  3. 3. 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>
  4. 4. 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>
  5. 5. QTP Window
  6. 6. Create a Test <ul><li>Objectives </li></ul><ul><li>Create a basic test from a manual test case. </li></ul><ul><li>Run a test and check for errors. </li></ul>
  7. 7. The Object Repository <ul><li>Object repository dialog box displays a test tree of all objects in the current action or the entire application. </li></ul><ul><li>Using Object repository we can </li></ul><ul><li>a) Identify the Object </li></ul><ul><li>b) View the Object Properties </li></ul>
  8. 8. Object Spy <ul><li>Using the Object Spy, we can view the properties of any Object in the open application. </li></ul><ul><li>We can also view Object Methods. </li></ul>
  9. 9. How Quick Test Recognizes Objects <ul><li>For each object class, QTP has a default set of properties that it always learns. </li></ul><ul><li>1.Mandatory Properties. </li></ul><ul><li>2.Assistive properties. </li></ul><ul><li>3.Ordinal Identifier. </li></ul><ul><li>Usually, only a few properties are needed to uniquely identify an object. </li></ul>
  10. 10. Synchronization <ul><li>Synchronization point enables the anticipated time problems between the application and QTP. </li></ul><ul><li>A progress bar reaches 100% completion. </li></ul><ul><li>A status message appears. </li></ul><ul><li>A button becomes enabled. </li></ul><ul><li>A window opens and is ready for data entry. </li></ul><ul><li>A pop-up message appears in response to an operation. </li></ul>
  11. 11. How to synchronize the Test <ul><li>We can synchronize the test by </li></ul><ul><li>1.Inserting a synchronization point </li></ul><ul><li>Insert  Step  Synchronization point </li></ul><ul><li>Window(“Flights”).WinButton(“Update order”).WaitProperty”enabled”,1,1000 </li></ul><ul><li>2.Adding Exist and Wait statements </li></ul><ul><li>status=Window(“Flights”).Dialog(“Flights Table”).Exist </li></ul><ul><li>Wait(10) </li></ul>
  12. 12. Checkpoints <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><ul><li>We can Insert checkpoint </li></ul><ul><li>1.From Menu </li></ul><ul><li>Insert  Checkpoint  Standard Checkpoint </li></ul><ul><li>2.From Keyword view </li></ul><ul><li>3.From the Active Screen </li></ul>
  13. 13. Checkpoint Types 1.Standard Checkpoint 2.Image Checkpoint 3.Table Checkpoint 4.Page Checkpoint 5.Text Checkpoint 6.Text Area Checkpoint 7.Bitmap Checkpoint 8.Database Checkpoint
  14. 14. Insert A Checkpoint From The Active Screen <ul><li>A checkpoint can be added after a test is created. </li></ul><ul><li>Use the Active Screen to select the field on which the checkpoint will be added. </li></ul><ul><li>Right-click on the appropriate field and choose “Insert Standard Checkpoint”. </li></ul>
  15. 15. Regular Expressions <ul><li>Regular expressions enable Quick Test to Identify Objects and text strings with varying values. </li></ul>
  16. 16. Use a Regular Expression <ul><li>A regular expression is a string that specifies a complex search phrase. By using </li></ul><ul><li>special characters you define the conditions of the search. </li></ul><ul><li>Note: There are 4 steps to ensure that a regular expression is inserted correctly. </li></ul><ul><li>From the Checkpoint Properties window, ensure Constant is enabled and click on the note paper icon. </li></ul><ul><li>Check Regular Expression checkbox. </li></ul><ul><li>If QTP sees there are characters that can be misconstrued as a regular expression, it will ask you to treat it as a literal character. Generally, you will answer No. </li></ul><ul><li>Add the regular expression. For example, Figure 6-6 will use [A-Z a-z]+. </li></ul>
  17. 17. Parameters <ul><li>Objectives </li></ul><ul><li>Describe and use multiple parameter types. </li></ul><ul><li>Drive data in multiple iterations. </li></ul><ul><li>Analyze errors during iterations. </li></ul><ul><li>Parameterize a checkpoint. </li></ul>
  18. 18. Input Parameters For Data driven Tests <ul><li>Input Parameters For Data Driven Tests </li></ul><ul><li>A data-driven test is one that runs a set of user actions with multiple input values. Data driving allows one script to test application functionality with many sets of data. </li></ul><ul><li>Automated data driven testing frees you to perform more tests, thus increasing test coverage. Speed, repeatability, free resources to do other kinds of quality control. </li></ul>
  19. 19. Input Parameter <ul><li>Input Parameters allow you to replace a static, recorded value in a step with a dynamic placeholder (parameter), which represents an expandable range of values. </li></ul><ul><li>Input parameter names and their values are located in QuickTest’s Data Table. </li></ul><ul><li>Input parameter values are input into the application from some outside data source. </li></ul>
  20. 20. Steps to Create An Input Parameter <ul><li>To create an input data table parameter: </li></ul><ul><li>Select the step in the Keyword View that contains the recorded input value. </li></ul><ul><li>From the Value column, click on the current value. </li></ul><ul><li>Click on the parameterize button. </li></ul><ul><li>The Constant value appears in the Value Configuration Options dialog box. </li></ul>
  21. 21. Set the Parameter Value <ul><li>In the VALUE CONFIGURATION OPTIONS dialog, select the Parameter radio button and ensure that Data Table is selected from the drop-down list. </li></ul><ul><li>From the Name drop down list, enter a unique column name to create a new column in your data table or choose an existing column name from the data table. </li></ul><ul><li>Use the default Global data sheet to store values. </li></ul><ul><li>Enter the values that QTP will input after the test executes. </li></ul>
  22. 22. Supply Data to the Parameter <ul><li>The design-time table is the central location for storing input parameter values. </li></ul><ul><li>The number of rows in the data table will cause the same number of test execution iterations to be run. </li></ul><ul><li>As a default, the design-time data table is displayed at the bottom of the QuickTest screen. </li></ul><ul><li>If you want to show or hide the data sheet, click on the icon in the toolbar. </li></ul>
  23. 23. Verify The Test Run <ul><li>View the Test Results window to verify that each of the rows from the Design Time Data Table was used during the test run. </li></ul><ul><li>Expand the tree for each iteration (Row#) to view specific information about the execution of the specific row. </li></ul>
  24. 24. Parameterize a Checkpoint <ul><li>You can use parameterized expected values to make your checkpoints dynamic. They Can be set on: </li></ul><ul><li>An object property in the Object Repository. </li></ul><ul><li>A checkpoint on a parameterized field. </li></ul>
  25. 25. A Test with Multiple Actions <ul><li>Actions can be divided into logical sections, like the main sections of a transaction, or by specific business processes. </li></ul><ul><li>When you create a new test, it contains one action. By dividing your tests into multiple actions, you can design more modular and efficient tests. </li></ul>
  26. 26. Types of Actions <ul><li>There are two kinds of actions: </li></ul><ul><li>Regular (Non-reusable) </li></ul><ul><li>Reusable </li></ul><ul><li>Tests that contain reusable actions can be used: </li></ul><ul><li>Locally </li></ul><ul><li>Externally </li></ul>
  27. 27. Insert Call to a New Action <ul><li>You can add a new action during or after recording. </li></ul><ul><li>Select Insert ? New Action from the QuickTest main menu. The Insert New Action window appears. </li></ul><ul><li>Or use the “lego” icon on the toolbar to insert new action. </li></ul>
  28. 28. Using Parameterized Data <ul><li>Test data can be passed from one test to another test using the value of an input parameter. </li></ul><ul><li>This creates a data flow between business processes. </li></ul><ul><li>The value passed from one business process to another will come from the Data Table. </li></ul><ul><li>Be aware of any data dependencies that occur within the business process. </li></ul>
  29. 29. Copied, Existing or New Action <ul><li>After reusable actions are created, they can be called into a “Main Calling” test in three ways: </li></ul><ul><li>Call to New Action </li></ul><ul><li>Call to Copy of Action </li></ul><ul><li>Call to Existing Action </li></ul>
  30. 30. Set Actions as Reusable <ul><li>Create a reusable action from the Action properties dialog. </li></ul><ul><li>Check the checkbox and click OK. A message will appear stating a description of a reusable </li></ul><ul><li>action. </li></ul>
  31. 31. Call An Action <ul><li>You can do number of things with a reusable action, such as: </li></ul><ul><li>Call it multiple times within a test. </li></ul><ul><li>Call it from other tests. </li></ul><ul><li>View the components of the action tree (you cannot modify them except in the original script) </li></ul><ul><li>Insert a call to an external action (the action is inserted in read-only format) </li></ul><ul><li>as local editable copy </li></ul><ul><li>use the (read only) data from the original </li></ul><ul><li>action </li></ul><ul><li>Insert copies of non-reusable actions into your test, but you cannot insert calls to non-reusable actions. </li></ul>
  32. 32. Recovery Scenarios <ul><li>To instruct Quick test to recover from unexpected events and errors that occur in the testing environment during the run session. </li></ul><ul><li>A Recovery scenario consists of </li></ul><ul><li>a) Trigger Event </li></ul><ul><li>b) Recovery Operation </li></ul><ul><li>c) Post Recovery Run Option </li></ul>
  33. 33. Recovery Scenario Wizard <ul><li>We can create the recovery scenario using recovery scenario wizard. </li></ul><ul><li>Recovery scenario wizard consists of </li></ul><ul><li>a) Define the trigger event that interrupts the run session </li></ul><ul><li>b) Specifying the recovery operations required to continue </li></ul><ul><li>c) Choosing a post recovery test run operation </li></ul><ul><li>d) Specifying a name and description for the recovery scenario </li></ul><ul><li>e) Specifying whether to associate the recovery scenario to the current test and / or to all new tests. </li></ul>
  34. 34. Recovery Scenario Wizard
  35. 35. Creating Tests without Object Repository <ul><li>We can use programmatic descriptions to perform an operation on an object that is not stored in the Object Repository. </li></ul><ul><li>Types of Programmatic descriptions </li></ul><ul><li>a) We can list the set of properties and values that describe the object directly in a test statement. </li></ul><ul><li>e.g: Dialog(“name:=Login”).WinEdit(“attachedtext:=agentname”).Set”impetus” </li></ul><ul><li>b) We can add a collection of properties and values to a description object and then enter the description object in the statement. </li></ul><ul><li>Set myobject=Description.Create() </li></ul><ul><li>myobject(“attachedtext”).value:=“agentname” </li></ul><ul><li>myobject(“html tag”).value:=“a” </li></ul><ul><li>Dialog(“name:=Login”).WinEdit (myobject).Set”impetus” </li></ul>
  36. 36. <ul><li>Interact with Test Objects not stored in the Object Repository </li></ul><ul><ul><li>You can also instruct QT to perform methods on objects without referring to the object repository without referring to the object’s logical name. To do this you provide QT with a list of properties and values that QT can use to identify the object or objects on which you want to perform a method </li></ul></ul>Enhance TestCases With Descriptive Programming
  37. 37. <ul><li>You can describe an object directly in a test statement by specifying property : = value pairs describing the object instead of specifying an object’s logical name. </li></ul><ul><li>Syntax:- </li></ul><ul><li>TestObject(“PropertyName1:=PropertyValue”, “…”, “PropertyNameX:=PropertyValueX”) </li></ul><ul><li>Where “Test Object” is test object class </li></ul>Enter Programmatic Descriptions Directly into Test Statements
  38. 38. <ul><li>PropertyName is PropertyValue </li></ul><ul><li>i.e. the test object property and its value . Each property:= value pair should be separated by commas and quotation marks. </li></ul><ul><li>For Example: Window(“Text:=Myfile.txt-Notepad”).Move 50,50 </li></ul><ul><li>If you want to use the same programmatic description several times in one test, you may want to assign the object you create to a variable. </li></ul><ul><li>For Ex:- Set MyWin := Window(“Text:=Myfile.txt-Notepad”) </li></ul><ul><li>MyWin.Move 50,50 </li></ul>Contd….
  39. 39. <ul><li>Once we have filled the Properties collection with a set of Property objects (properties and values), you </li></ul><ul><li>Can specify the Properties object in place of a logical name in a test statement. </li></ul><ul><li>For Ex:- (Instead of Entering) </li></ul><ul><li>Window(“Error”).WInbutton(“text:=OK”, “width:=50”).click </li></ul><ul><li>IF Entered… </li></ul><ul><li>Set MyDescription= Description.Create() </li></ul><ul><li>MyDescription(“text”).Value=“OK” </li></ul><ul><li>MyDescription(“width”).Value=50 </li></ul><ul><li>Window(“Error”).WinButton(MyDescription).Click </li></ul>Contd….