RSS Feed

QTP – Concepts of Check Points

Posted on

Every test case will be having an “Expected Result” and during the execution, this needs to be compared with the “Actual Result” to verify whether the application under test is working properly as expected. QuickTest Professional provides an excellent feature called “Checkpoints” to accomplish this.
As the meaning of the word “checkpoint”, it compares the run time value for a specified property of an object to the existing value for that property.
There are eight different checkpoints available in QTP:

  1. Standard checkpoint
  2. Text checkpoint
  3. Text Area checkpoint
  4. Bitmap checkpoint
  5. Database checkpoint
  6. Accessibility checkpoint
  7. XML checkpoint
  8. Page Checkpoint
  9. Image Checkpoint

To access the checkpoints in QuickTest:
Click Insert –> Checkpoint –> click on the desired checkpoint, Below figure shows the same.

checkpoints_thumb

Standard Checkpoint:
This type of checkpoint is used to verify the property value of an object during runtime. We will try to record a test, insert a checkpoint, and verify the expected result.
Test Scenario:
Record the below test steps on Flight sample application.

  1. Login with appropriate credentials
  2. Insert a new order
  3. Verify the new order inserted (Insert Checkpoint)

Once the steps 1 & 2 are done, then insert the checkpoint:

  1. Click Insert—> Checkpoint—> Standard Checkpoint
  2. Click on the Edit box containing label “Insert Done..” (ActiveX Threed Panel Control)
  3. Some properties are selected by default (enabled, height, width, x, y)
  4. Uncheck these check boxes
  5. Select “text” property
  6. Click OK

InsertCheckpointStandard_thumb

Checkpoint_thumb

Below is the code generated after the record:


SystemUtil.Run "C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe","","C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\","open"
Dialog("Login").WinEdit("Agent Name:").Set "admin"
Dialog("Login").WinEdit("Password:").SetSecure "4e9197d45a68ae7082b90807ff0c70a4ad5011f7"
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").ActiveX("MaskEdBox").Type "120312"
Window("Flight Reservation").WinComboBox("Fly From:").Select "Denver"
Window("Flight Reservation").WinComboBox("Fly To:").Select "London"
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "Joseph"
Window("Flight Reservation").WinButton("Insert Order").Click
Window("Flight Reservation").ActiveX("Threed Panel Control").Check CheckPoint("Threed Panel Control")
Window("Flight Reservation").WinMenu("Menu").Select "File;Exit"

Execute the recorded test and open the test result. Result contains the checkpoint status. Go through the below figure.

CheckpointResult_thumb

Since the property “text” is selected while inserting the checkpoint, only that value is compared with the run time value and the status is set as “Passed”.

Text Check Point:

Text checkpoint enables user to Check object’s text property value in different ways.

Steps to follow for inserting Text checkpoint:

QTP should be in Recording mode –>Insert menu –> checkpoint –> Text checkpoint –> Show the object –> click OK –> Select options –> We can select one or more options –> click OK–> stop Recording.

Text Area checkpoint:

Text Area checkpoint enables user to check the text area present in the application.

Steps to follow for inserting Text Area Checkpoint:

QTP should be in Recording mode –> Insert menu–> Checkpoint –> Text area checkpoint –> Mark the area of text –> select one or more options –> Click ok –> stop recording.
Bitmap checkpoint :

Bitmap checkpoint enables user to compare two bitmaps. User can compare complete bitmaps as well as part of the bitmaps.

Steps to follow for Inserting bitmap checkpoint:

QTP should be in Recording mode –> Insert menu –> Checkpoint –> Bitmap checkpoint –> show the Bitmap –>click OK –>select “check only selected area” option if we want to compare part of the bitmap –> click OK –>stop recording.

Database checkpoint:

Database checkpoint enables user to check the Content of the back end Database.

Steps to follow for inserting Database checkpoint:

QTP need not be in Recording mode and we do not need AUT since data is from backend.

Insert –> checkpoint –> Database checkpoint –>choose “specify SQL statement manually” option –>click next –> click create –> select machine data source –> Select DSN (QT_flight32) –> click OK –> enter SQL statement (select * from orders) –> finish –> click OK.

Accessibility checkpoint:

Accessibility enables user to check whether the webpage in our web application is developed according to W3C (World Wide Web consortium) Rules and Regulations or not.It is a configurable checkpoint, according to our requirements, we can customize.
Steps to Configure accessibility checkpoint:

Tools menu–>options–>web –>advanced –>check/uncheck items –>click apply –>click OK

Steps for Inserting Accessibility checkpoint:

Keep tool under recording mode with web environment –>insert–>checkpoint–>accessibility checkpoint–>show the webpage–>click OK–>click OK–>stop recording.

XML checkpoint:

XML checkpoint enables user to check content of the XML file.

Steps to follow for inserting XML Checkpoint:

QTP should be in Recording mode in web environment –>insert menu –>checkpoint (from application)–>show the xml pages >click OK –>stop Recording.

Page Checkpoint:

Page checkpoints enables user to check number of Links, Images and Loading time in a web page.It is a hidden checkpoint. we can insert this through standard checkpoint.

Steps to follow for Inserting Page Checkpoint:

QTP should be in Recording mode with web environment –>Insert menu –>checkpoint –>Standard checkpoint >show the web page –>click OK –>click OK –>stop recording.

Image Checkpoint :

Image checkpoint enables user to check the Image property values.
Steps to follow for Inserting Image Checkpoint:

QTP should be in Recording mode with web environment –>Insert menu –>checkpoint >standard checkpoint –>show the image –>select image –>click OK –>click OK >stop recording.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: