In the previous QTP training session, we provided a list of all the checkpoints available in QTP. These checkpoints play a crucial role in inserting verification points in QTP tests to compare the current and expected values of an object. The comparison determines whether the test passes or fails.
Recommended IPTV Service Providers
- IPTVGREAT – Rating 4.8/5 ( 600+ Reviews )
- IPTVRESALE – Rating 5/5 ( 200+ Reviews )
- IPTVGANG – Rating 4.7/5 ( 1200+ Reviews )
- IPTVUNLOCK – Rating 5/5 ( 65 Reviews )
- IPTVFOLLOW -Rating 5/5 ( 48 Reviews )
- IPTVTOPS – Rating 5/5 ( 43 Reviews )
Today’s tutorial will focus on the usage of QTP Standard and Image checkpoints.
#1) It is used to verify the value of an object property.
#2) Compares the expected value with the actual value during runtime.
#3) Recording or editing a test allows for the insertion of a standard checkpoint.
#4) The active screen can also be used to add this checkpoint. Sufficient information about the objects on the active screen is necessary for successful checkpoint insertion.
For example, if the screen contains a Login edit box, Password Edit box, OK, Cancel, and Help buttons, and we want to check the visibility of the Cancel button, a checkpoint can be placed on the “Visible” object property of the Cancel button.
During recording, if only the Login, Password, and OK actions are captured on the active screen, the Cancel button cannot be selected for insertion since the active screen lacks information about that object.
Therefore, it is essential for the active screen to capture all objects on the page before inserting a checkpoint. The active screen should have sufficient information to facilitate checkpoint placement.
#5) The properties of a checkpoint can be modified using the “Checkpoint Properties” dialog box.
#6) Every added checkpoint is stored in the local object repository and can be moved to the shared object repository if required.
#7) Supported in all environments with the appropriate add-ins loaded.
#8) Examples of objects that can be used for standard checkpoints are web images, edit boxes, static text, and web tables, among others.
How to Add a Standard Checkpoint While Recording?
Step #1: Insert -> Checkpoint: Select this option from the menu after starting a record session.
Step #3: A list of relevant checkpoints applicable to the current or selected step will appear.
Step #4: Select the type of checkpoint, such as “Standard”.
Step #5: The QTP interface will be hidden, and the user can choose the object in the AUT (Application Under Test) over which the checkpoint should be inserted.
Step #6: Select the object, and the properties dialog box will appear.
Step #7: Choose the object and click OK. The checkpoint properties dialog box will be displayed.
Step #8: Select the properties to be checked and click OK. In this example, we are selecting the name property. The properties can be modified to use a constant value or parameterization. Additionally, a timeout parameter can be set.
QTP waits for the specified number of seconds for the object’s property value to be achieved before performing the check.
Step #9: Set the parameters and click OK.
Step #10: This is how the checkpoint appears in the keyword view.
Step #11: In the expert view, the following code is displayed.
Browser("Gmail: Email from Google").Page("Gmail: Email from Google").WebButton("Sign in").Check CheckPoint("Sign in_2")
How to Add a Standard Checkpoint While Editing?
#1) Active Screen: Right-click on an object in the Active Screen and select the option to insert a standard checkpoint. Follow the same steps as mentioned above to complete the insertion.
#2) At any step in the QTP test, select the menu option “Insert -> Checkpoint” and choose “Standard checkpoint”. Follow the steps mentioned above.
How to Access and Modify Checkpoint Properties?
Checkpoint properties can be modified as required after creation using the “Checkpoint Properties” dialog box.
The dialog can be accessed through the following methods:
#1) While creating a checkpoint, this dialog is used for the initial property definition.
#2) Select an existing checkpoint statement in the Keyword view, right-click, and select “Checkpoint properties”.
#3) Open the object repository to view the available properties.
All the properties of a checkpoint can be modified as required using this dialog.
With the detailed steps provided above, you can add standard checkpoints in different scenarios and modify them in various ways. Going forward, we will list the properties and features that are unique to each checkpoint type.
It should be noted that the steps for adding, using, and manipulating checkpoints are generally the same for most checkpoints. Unless otherwise specified, the above approach can be used generically for other checkpoints as well.
A slight variation of the standard checkpoint occurs when it is used on web images.
If the object on which the checkpoint is inserted is a web image, the following dialog box will appear:
Note that this dialog is almost identical to the “Checkpoint Properties” dialog, but it is specific to images.
The only additional parameter is the “Compare Image Content” checkbox. When checked, the image during runtime is compared with the one stored during checkpoint creation to determine if they are exactly the same. If they match, the test results will only display one image. If they are different, both images will be shown in the test results.
For example, when attempting to add a standard checkpoint on one of the images from the Active Screen on the Gmail page, the following dialog appears:
No changes have been made to the dialog in this example, but you are free to modify the settings and click OK.
This is how the inserted checkpoint will appear:
Expert View Code:
Browser("Gmail: Email from Google").Page("Gmail: Email from Google").Image("nosign-r42").Check CheckPoint("nosign-r42")
That’s all for today! We will cover the other checkpoints in future sessions. Feel free to ask any questions.