Sunday, August 5, 2007

QTP Tutorials 4 - Standard Checkpoint

Checkpoints cannot be added manually, they are inserted using QTP's interface. Results of the checkpoint can be viewed in the Test Results Window.

Checkpoint information is stored in the Local Object Repository. It is in the Resource.mtr file which is in the action folder (if you created checkpoint in action1 then it will be action 1 folder under the folder in which you are saving the test/script, if you created checkpoint in action 2 then it will be action 2 folder and so on) .

In the expert view, on any blank line type Checkpoint and put "(". As soon as you put the starting bracket it will show all the checkpoints you have used in the test.

Now we will start with checkpoints. I will try to show easy to understand example of each and every checkpoint.

Lets start with simple example of standard checkpoint which checks a variety of objects such as buttons, radio buttons, combo boxes etc. Standard checkpoints are supported for all add-in environments

  1. Open a blank test.
  2. Make sure that Flight application is open.
    (Now only QTP with blank test and Flight application should be open).
  3. Click on Record. When we click on Record, "Record and Run Settings" window opens up. Go to "Windows Applications" tab and choose first option "Record and run test on any open Windows based application." and click ok.
  4. Go to Insert (menu)->Checkpoint->Standard Checkpoint (or press F12).The mouse pointer will become hand and QTP will be minimized.

  5. Click on the "Flights..." button which is on the Right Hand Side of the "Fly To" combo box in the Flight application.

  6. It will open "Object Selection - Checkpoint Properties" window (with WinButton:FLIGHT highlighted). Click ok.
  7. It will open checkpoint properties window. (only one property will be checked in it i.e. 'enabled' with a value of False.)
  8. Click ok. Click on Stop in order to stop the Recording.

  9. Save the test.

This is a small test in which we have used standard checkpoint and captured the disabled button on the Flight application. Now we can run the test in two ways to see how it fails and passes the results of the checkpoint.

To see a pass test result:

Make sure that this test and Flight application is open.
Click on run.
It will Run the test and show you the result as pass.

To see a Fail test result:


Make sure that this test and Flight application is open.


In the Flight application enter the Date of Flight, Fly From and Fly To fields and nothing else. (The reason for doing this is that it will enable the 'Flight...' button)

Click on run in order to run the test.

It will Run the test and show you the result as Fail. This is because QTP was looking for a disabled 'Flight...' button for which it recorded the information at the record time, but now since the button was enabled at run time, so it failed.


This will help you in understanding the standard checkpoint in QTP more deeply.



Also See:

Checkpoints in QTP
Example of QTP Existing Checkpoint
Example of QTP Page Checkpoint
Example of QTP Database Checkpoint
Example of QTP Bitmap Checkpoint
Example of QTP Image Checkpoint
Example of QTP Text Checkpoint
Example of QTP Table Checkpoint
Checkpoint Return Values
Difference between Text & Text Area Checkpoint