Checkpoints are verification points in the test which allow us to compare expected to observed values. Checkpoints can be added while recording the test or afterwards when editing the test. In general, it’s easier to add a checkpoint after the test has been recorded.
Checkpoint information is stored in the Local Object Repository. In the expert view, on any blank line type Checkpoint and put "(". As soon as we put the starting bracket it will show all the checkpoints we have used in the test.
We can add a checkpoint in the keyword view by selecting a row, right clicking and selecting Insert Standard Checkpoint. This will open a dialog that looks like this:
We can then choose which property of the control we wish to verify, whether or not we want to use a constant or a parameter, the number of seconds QTP has to verify the checkpoint and whether we want the verification to take place before or after the currently highlighted step.
Checkpoint property’s values can be either validated with the constants or they can be parameterized. In case of parameterization, values (which are expected to be property value) are passed through Data sheet and property is validated against those values during run time.
To add checkpoints while recording or editing:
Ø Select the step where we need to add the checkpoint and choose Insert > Checkpoint > Standard Checkpoint.
Ø Right-click any object in the Active Screen and choose the relevant checkpoint option:
· Insert Standard Checkpoint
· Insert Bitmap Checkpoint
· Insert Accessibility Checkpoint
These options can be used to create checkpoints for any object in the Active Screen (even if the object is not part of any step in the Keyword View).
Different Types of Checkpoints :
Image Checkpoint checks the value of an image in the application or Web page. For example, we can check that a selected image’s source file is correct. We can create an image checkpoint by inserting a standard checkpoint on an image object.
suppose Visual Basic application has a button that says View Doc
elsewhere in the application. We can create a text area checkpoint to confirm that the number displayed on the button is the same as the number
entered in the form. Text area checkpoints are also supported for some external add-in environments, such as Java.
details of a database containing Project information for our application.
Checkpoints are also differentiated as Normal QTP Checkpoints (as listed above), and Custom Checkpoints. Following are the Custom checkpoints which are normally inserted within some conditions and can be viewed in the Test Results window.
Ø Reporter.ReportEvent micPass
Ø Reporter.ReportEvent micFail
Ø Reporter.ReportEvent micWarning
Post a Comment