Search here for all the info you want in this Blog

Check Points

A checkpoint is a verification point that compares a current value for a specified property with the expected value for that property. This enables you to identify whether your Web site or application is functioning correctly. 
Note: If you want to retrieve the return value of a checkpoint (a boolean value that indicates whether the checkpoint passed or failed), you must add parentheses around the checkpoint argument in the statement in the Expert View. For example:
a = Browser("MyBrowser").Page("MyPage").Check (CheckPoint("MyProperty")) 

Adding Checkpoints to a Test 
You can add checkpoints during a recording session or while editing your test.
To add checkpoints while recording or editing: 
Use the commands in the Insert > Checkpoint menu, or click the Insert Checkpoint button on the toolbar.
To add a checkpoint while editing only
Right-click the step where you want to add the checkpoint and choose Insert Standard Checkpoint.
Select the step where you want 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). 

Standard Checkpoint:
This option is used to verify the physical properties and standard properties of an object or a window. It can be used on both windows and web applications.
Steps to insert Standard check point:
1. Ensure that the requires object is available
2. Click on Record -> Select insert -> Checkpoint -> Standard checkpoint
3. Take the hand icon -> Click on the required object
4. Select the required property -> Provide the expected value for each property
5. Provide the time out value for the checkpoint in seconds -> Click on OK
--> Using this checkpoint we can verify properties of one object only, but we can verify one or more properties of that single object.
Setting General Standard Checkpoint Options 
The bottom part of the Checkpoint Properties dialog box contains the following options: 
Checkpoint timeout. Specifies the time interval (in seconds) during which QuickTest attempts to perform the checkpoint successfully. QuickTest continues to perform the checkpoint until it passes or until the timeout occurs. If the checkpoint does not pass before the timeout occurs, the checkpoint fails. 
For example, suppose it takes some time for an object to achieve an expected state. Increasing the checkpoint timeout value in this case can help ensure that the object has sufficient time to achieve that state, enabling the checkpoint to pass (if the data matches) before the maximum timeout is reached. 
If you specify a checkpoint timeout other than 0, and the checkpoint fails, the Test Results window displays information on the checkpoint timeout. 
Insert statement. Specifies when to perform the checkpoint in the test. Choose Before current step if you want to check the value of the object property before the highlighted step is performed. Choose After current step if you want to check the value of the property after the highlighted step is performed.
Note: The Insert statement option is not available when adding a checkpoint during recording or when modifying an existing object checkpoint. It is available when adding a new checkpoint to an existing test while editing it. 

Page Checkpoint:
This option is used to verify the properties of webpage like Load time, number of images, number of links, HTML source ,HTML tag, source of that images, URL of that links and broken links
Note: This is applicable for WebPages only
Steps to insert Page check point:
1. Ensure that the required webpage is available -> Click on record
2. Select insert -> Checkpoint -> Standard checkpoint
3. Click on the required webpage
4. Select page option from hierarchy of the object
5. Select he required properties to be verified
6. Provide the expected values from properties
7. Provide the value -> Click on OK

To insert the page checkpoint automatically for each webpage, while recording, use the following step:
Tools -> Options -> Click on web tab -> Click on advance tab -> Enable the checkpoint or automatic page checkpoint -> Select the required properties to verify -> Click on apply -> Click on OK.


Image Checkpoint:
This option is used to verify the properties of an image like name, source, HTML tag, etc…

Steps to insert Image check point:
1. Ensure that the required webpage is available
2. Click on record -> Select insert -> Checkpoint -> Standard checkpoint
3. Take the hand icon -> Click on the required image
4. Select required image from the hierarchy -> Click on OK
5. Select the required properties
6. Provide the expected value -> Provide the timeout value
7. Click on OK

Text Checkpoint: 
This option is used to verify the text from an object or window
Steps to insert Text check point:
1. Ensure that the required object is available
2. Click on record -> Insert -> Checkpoint -> Text checkpoint
3. Click on the required object -> Click OK
4. Edit the expected value -> Select the verification objects like space, match case, exact match etc……
5. Click on configure -> Click text before and text after -> Click on OK
6. Provide the time out value -> Click OK

Text Area Check point:
This option is used to verify the specific text string with a defined area.
Steps to insert Text Area Check point:
1. Ensure that the requires object is available
2. Click on Record -> Select insert -> Check point -> Text area check point
3. Select the required text area from the object with the cross hairs
4. Select the required verification option like exact match, match case, ignore space etc...
5. Click on configure -> Click on text before and text after -> Click on OK

Bitmap Checkpoint:
It is a part of standard checkpoint; this is used to verify the content of an image either by selecting the complete image or only the required area

Steps to insert Bitmap checkpoint:
1. Ensure that the required bitmap window is available
2. Click on record -> Select insert -> Checkpoint -> Bitmap checkpoint
3. Take the hand icon -> Click on the required bitmap/image
4. To verify only the part of an image, Click on select area button
5. Select the required area of an image with cross hairs
6. Enable the check button -> Save the selected area
7. Click on Yes to delete the area which is not selected
8. Provide the timeout value -> Click on OK button

Difference between Bitmap and Image Checkpoint?

1. Using image checkpoint, we can verify the properties of an image like name, type, source, HTML tag, and the content also, where as in bitmap checkpoint, we can verify only the content of the image and not the properties..
2. In bitmap checkpoint, we can verify only the required part of an image where as in Image Check point we can not verify only the required part of an image.
3. Image checkpoint is only for Web based applications, but bitmap checkpoint is used for both windows and web based applications.



Database Checkpoint:
This option is used to verify the contents of a database table.
Steps to Insert Database Checkpoint (Ms-Access):
1. Ensure that the required database is available
2. Select Insert option from menu -> Checkpoint -> Database checkpoint
3.Select your database selection preferences. You can choose from the following options: *Create query using Microsoft Query. Opens Microsoft Query, enabling you to create a new query. After you finish defining your query, you return to QuickTest. This option is available only if you have Microsoft Query installed on your computer.
*Specify SQL statement manually. Opens the Specify SQL statement screen in the wizard, which enables you to specify the connection string and an SQL statement.
*Maximum number of rows. Select this check box if you would like to limit the number of rows and enter the maximum number of database rows to check or output. You can specify a maximum of 32,000 rows.
*Show me how to use Microsoft Query. Displays an instruction screen when you click Next before opening Microsoft Query. (Enabled only when Create query using Microsoft Query is selected).
4. Select the radio button Specify the sql statement manually.
5. Click on Next
6. Click on Create (To Create a New Connection String)
7. Click on New (To Create a New DSN)
8. Select the database driver in Microsoft Access Driver (*.mdb)
9. Click on browse -> Provide the name of the DSN
10. Click on Save -> Click on Next -> Click on Finish
11. Click on Select database
12. Select the required drive name & navigate to the location where the database file exists
13. Select the required “.mdb” file -> Click on OK
14. Select the DSN which we have created -> Click on OK
15. Provide the required SQL command (Select * from order)
16. Click on Finish
17. Select the required cell & edit the expected value required -> Click on OK

XML Checkpoint:
This option is used to verify the contents schema, attributes, etc of an XML file.

We can create XML checkpoints in 2 ways
1. XML checkpoint from Resource
2. XML checkpoint from Application

Steps to Insert XML Checkpoint From Resource:
1. Ensure that the path of the XML file is available
2. Select Insert -> Checkpoint -> XML checkpoint
3. Provide the path of the XML checkpoint -> Click on OK
4. Select the required mode from the left panel & Select the required attribute from the right panel.
5. Edit the expected value from the attributes
6. Enable the check button “Number of attributes”
7. Click on OK


Steps to Insert XML Checkpoint From Application:

1. Ensure that the XML file is open
2. Click on record
3. Select insert -> Checkpoint -> XML checkpoint from application
4. Take the hand icon -> Click on the XML file
5. Select the required nodes and required attributes
6. Edit the expected values from the attributes
7. Click on OK

No comments:

Post a Comment