A Free Template From Joomlashack

QTP Tutorial 13

 

This tutorial introduces Checkpoints

 

Please be patient . Video will load in some time. If you still face issue viewing video click here

 

Video Transcript with Key Takeaways Highlighted

  • You may have notice that results generated for our test script has no Pass/ Fail Status without which our automation is incomplete
  • The expected TEST RESULT for our scenario should be - Flight Reservation Window
  • which is this screen should appear after entering valid username and password. To accomplish this we will need to record an additional step # 6 which is Check Flight Reservation Window is Displayed..
  • Automation of this verification step can be achieved using Checkpoints- A checkpoint is a verification point that compares the current value with the expected value for specified properties of an Object. If they current and expected value match it generates a PASS status otherwise FAIL status
  • Lets go ahead and record step # 6
  • To add a checkpoint , right click on the step #  5 after which checkpoint needs to be inserted .Choose Insert Standard Checkpoint. Checkpoint Properties Dialog Box Opens.
  • QTP assigns a default name to checkpoint. You can input your preferred name
  • The table shows all the recorded properties and their corresponding values for the object. The Selection mark indicates that these properties will be checked
  • ABC icon indicated that the property values are a constant. If you parameterize any of the selected properties the icon changes correspondingly
  • Lets stick to the default and insert the statement after the current step. Click okay
  • A check statement with checkpoint name is inserted at line # 6.Lets replay the script
  • The script gives a Run-Time Error
  • Well this is a common source of error for beginners and happens because at step # 5 , QTP closes the Flight Reservation Screen and when the execution reaches step # 6 there is no Flight Reservation Screen  Object available to very its properties. You need to ensure , that the object which are verifying is available while QTP executes the Checkpoint Step
  • This error can be rectified by changing the sequence of Tests Steps. You need to switch
  • Step 5  & step 6 . In the new scenario step 5 is verify the Flight Reservation Window Exists and step 6 is to Close the application
  • In QTP , you just need to cut step # 6 and paste it at location of step # 5.Lets replay the script again. The Script passes and the results tree gives the checkpoint values that were compared. That's all to standard checkpoints
  • A recap of checkpoints-
  • There are many types of checkpoints and the most generic is the standard checkpoint.
  • Standard checkpoints compare the expected values of object properties captured during recording to the object's current values during a run session

 

                                                                           Back to QTP Tutorials Page