UFT/QTP – Check Points

A checkpoint is one of the options provided by UFT to enhance the script.

Checkpoints are verification points used to compare actual value (actual value is present in the application) with the expected value (Expected value is supposed to be in the application) which can be inserted at any point of time in the script.

Types of Checkpoints

UFT provides the following types of checkpoints:

  1. Standard Checkpoint
  2. Image Checkpoint
  3. Bitmap Checkpoint
  4. Table Checkpoint
  5. Text Checkpoint
  6. Text Area Checkpoint
  7. Accessibility Checkpoint
  8. Page Checkpoint
  9. Database Checkpoint
  10. XML Checkpoint From Application
  11. XML Checkpoint From Source
  12. File Content Checkpoint

Note – Using Standard checkpoint other checkpoints image, page & table can be applied.

Standard Checkpoint

Standard checkpoint compares property values of an object in the application with the expected values. Objects such as list boxes, buttons can be checked using standard checkpoints.

Steps to insert checkpoint:

  • Click Record button, Select “Design > Checkpoint > Standard Check Point”
  • Click the object to be checked in the application. Checkpoint properties dialog will shown as below
    QTP Standard Checkpoint
  • Select the object and Click OK. Checkpoint properties dialog will shown as below
    QTP Standard Checkpoint Properties
  • Check the properties to be checked as shown in above figure.
  •  Set the expected value for the property in the constant field.
  • Click OK.

Image Checkpoint

Image checkpoint is used to check for the values of image. Image checkpoint is created by inserting a standard checkpoint on image object.

Steps to Insert an Image Checkpoint

  •  Click Record button, Select “Design > Checkpoint > Standard Checkpoint”
  • Click the image object which you want to check in the application. Checkpoint properties dialog will shown as below
    QTP Standard Checkpoint Image
  • Select the image object and click ok as shown as above
    QTP_Standard_Checkpoint_Image_Properties
  • Image Checkpoint Properties dialog will appear as shown below.
  • Check the properties to be checked and enter the expected value in the constant  field.
  • Click OK. Image checkpoint will be inserted into the test.

Bitmap Checkpoint

This checkpoint checks the content of the bitmap in the application. Bitmap checkpoints are also applicable for buttons, text boxes and tables.

Steps to Insert a Bitmap Checkpoint

  • Click Record button, Select “Design > Checkpoint > Bitmap Checkpoint”
  • Click an object to be checked and select the object from the object selection dialog as shown below.
    QTP_Bitmap_Checkpoint
  • Select the Image and click OK
  • Bitmap checkpoint properties dialog box will appear as shown below.
    QTP_Bitmap_Checkpoint_Properties
  • Check entire bitmap/Check only selected area (This option allow to the user to select a specific area or entire area of the bitmap is compared)
  • Save only selected area (this option will save the selected area of the bitmap)
  • Bitmap checkpoint tolerance Options –
    RGB Tolerance (This option is limited to bitmaps with color depth of 24bits.)
    Pixel Tolerance (The pixel tolerance determines the number or percentage of pixels in the actual bitmap and expected bitmap.)
  • Set the desired option and Click OK.

Table Checkpoint

Table checkpoint are applied on the web tables and are used to check the content within the tables. Table checkpoint is applied through standard checkpoint.

Steps to Insert a Table Checkpoint

  • Click Record button, Select “Design > Checkpoint > Standard Check Point”
  • Click the table object which you want to check in the application. Checkpoint properties dialog will shown as below.
    QTP_Table_Checkpoint
  • Select the table from the displayed object and Click OK. The table checkpoint properties dialog box opens as shown below.
    QTP_Table_Checkpoint_Properties
  • Specify the setting for the table checkpoint.
  • Click OK. Table check point is added in the test  for the selected object.

Text Checkpoint

Text checkpoint is used to check, the text string is displayed in the appropriate place on the application.

Steps to Insert a Text Checkpoint

  • Click Record button, Select “Design > Checkpoint > Text Check Point”
  • Click the text string that has to be compared. Text checkpoint properties dialog box will appear as shown below.
    QTP_Text_Checkpoint
  • Select option from Checked Text, Text Before and Text After according to your requirements.
  • Click OK. Text checkpoint will be added in your test.

Text Area Checkpoint

Text Area Checkpoint checks that a text string is displayed within a defined area in a window-based application.

Steps to Insert a Text Area Checkpoint

  • Select “Design > Checkpoint > Text Area Check Point”
  • Define the area of text which you want to check by clicking and dragging the crosshairs pointer.
  • Select the object for which you are creating the checkpoint. Text Area checkpoint dialog box will open
  • Specify the checkpoint properties
  • Click OK. A checkpoint statement is added for the selected object.

Accessibility Checkpoint

Accessibility Checkpoint identifies area of your application that may not conform to the World Wide Web Consortium (W3C) and Web Content Accessibility Guidelines (WCAG).

Steps to Insert an Accessibility Checkpoint

  • Configure the guidelines to be checked by accessibility checkpoint in “Tools > Options > GUI Testing > Web”. Select advanced option and select the guidelines to be checked.
    QTP_Accessibility_Setting
  • Click Record button, Select “Design > Checkpoint > Accessibility Checkpoint”
  • Click the page to be checked. Accessibility checkpoint properties dialog box will be opened with the options checked in step 1.
  • Click OK. Accessibility checkpoint will be added in the test.

Page Checkpoint

Page checkpoint is used to check the characteristic of a web page. You can check load time the web page or contains broken links.

Steps to Insert an Page Checkpoint

  • Click Record button, Select “Design > Checkpoint > Standard Checkpoint”
  • Click the web page which you want to check. Checkpoint properties dialog will shown as below.
  • Select a page item from above dialog box and click OK. The Page Checkpoint properties dialog box opens as shown below.
  • Specify the setting for the checkpoint like HTML Source, HTML tags, Links, Images, Broken Links.
  • Click OK. Page checkpoint will be added in the test.

Database Checkpoint

Database checkpoint is used to check the contents of a database accessed by your application.

Steps to Insert an Database Checkpoint

  • Select “Design > Checkpoint > Database Checkpoint”. The database query wizard opens.
  • Select your database preferences form Create query using Microsoft Query, Specify SQL statement manually and Maximum number of rows.
  • Click the Next button, the screen that opens depends on the option you selected. (Select option Specify SQL statement below screen will display)
  • Create Connection string and SQL statement and click Finish button. Database checkpoint properties dialog box will open.
  • Select the checks same as table checkpoint and click OK. Database checkpoint will be added in the test.

XML Checkpoint (from Resource)

Checks  the data content of XML documents in XML files.

Steps to Insert an XML Checkpoint from Resource

  • Click Record button, Select “Design > Checkpoint > XML Checkpoint (from Resource)”. XML checkpoint from file dialog will open.
  • Select the file to check and click OK. XML checkpoint properties dialog will open as shown below.
  •  Select the checkbox against the element.
  • Click OK. XML checkpoint will be added in the test.

XML Checkpoint (from Application)

Checks  the data content of XML documents in web pages and frames.

Steps to Insert an XML Checkpoint from Application

  • Click Record button, Select “Design > Checkpoint > XML Checkpoint (from Application)”. XML checkpoint from application will open.
  • Click the XML document opened in the web browser. XML checkpoint properties dialog box will open as shown below.
  • Select the checkbox against the element.
  • Select OK. XML checkpoint will be added in the test.

File Content Checkpoint

You can use file content checkpoints to compare the textual content of a file that is generated during a run session with the textual content of a source file. This enables you to verify that the generated file contains the expected results.

You can perform a file content checkpoint for any of the following file types:

  • HTML
  • PDF
  • Microsoft Word
  • Text
  • RTF

Important Information for File Content Checkpoint:- Note the following before inserting a file content checkpoint:

File location – The source file must be located on the file system.

Availability – Recording sessions & Editing sessions

Working with ALM – You cannot use a file content checkpoint in a keyword GUI component, You cannot use a file content checkpoint on a file stored in ALM.

Steps to Insert an File Content Checkpoint

  • Select  Design > Checkpoint > File Content Checkpoint. The Source File for Checkpoint dialog box will open.
  • Browse and select the relevant file, and click Open. The File Content Checkpoint Properties Dialog box will open. The Content of the file will be shown in File Content Editor. You can select one line, multiple or all lines you want to verify.
  • Click the check box to select (or clear) the line for verification. You can specify a regular expression for as well for verification for the content. File Content Editor has the toolbar button or right click menu option to evaluate the regular expressions. It also has the feature to preview the comparison.
  • Click OK.

 

Leave a Reply

Your email address will not be published. Required fields are marked *