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}
There are many types of checkpoints detialed below
- Standard checkpoints: It compares the expected values of object properties captured during recording to the object's current values during a run session
- Page Checkpoint : A Standard Checkpoint created for a web page can be called a Page Checkpoint. It is used to check total number of links & images on a web page. Page Checkpoints can be used to check Load Time i.e. time taken to load a web page.
- Bitmap Checkpoint helps a user in checking the bitmap of an image or a full web page. It does a pixel by pixel comparison between actual and expected images.
- Image Checkpoint enable you to check properties like source file location of a web image. Unlike , Bitmap Checkpoint you can not check pixels(bitmaps) using image checkpoint.
- Text Checkpoint is Used to check expected text in a web-page or application. This text could be from a specific region of the application or a small portion of text displayed
- Accessibility Checkpoints verifies compliance with World Wide Web Consortium (W3C) instructions and guidelines for Web-based technology and information systems. These Guidelines make it easy for disabled to access the web.
- Database Checkpoints create a query during record time and database values are stored as expected values. Same query is executed during run time and actual & expected values are compared.
- In Table Checkpoint , you dynamically can check the contents of cells of a table (grid) appearing in your environment. You can also check various table properties like row height , cell width and so on. Table Checkpoint is similar to Database Checkpoint
- Using XML Checkpoints you can verify XML Data ,XML Schema, XML Data
Following Videos gives steps to create a Standard Checkpoint
Takeaways from the Video
- 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. 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
This video tutorial demonstrates different types of Checkpoints in Quick Test Professional