Knowledge Share

Knowledge is NOT Power IMPLEMENTATION of knowledge is Power!!!
 
HomePortalGalleryCalendarFAQRegisterUsergroupsLog in

Share | 
 

 QTP Notes

View previous topic View next topic Go down 
AuthorMessage
Admin
Admin


Posts : 142
Points : 410
Reputation : 0
Join date : 2007-12-29
Location : Chennai

PostSubject: QTP Notes   Mon Dec 01, 2008 10:06 am

Checkpoints
5.1 About Checkpoints
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.
5.2 Adding Checkpoints to a test
There are several ways to add checkpoints to your tests.
5.2.1 To add checkpoints while recording:
We can add checkpoints while recording the test. Use the commands on the Insert menu, or click the arrow beside the Insert Checkpoint button on the Test toolbar. This displays a menu of checkpoint options that are relevant to the selected step in the test tree.
From Menu bar
Use the commands on the Insert menu, or click the arrow beside the Insert Checkpoint button on the Test toolbar. This displays a menu of checkpoint options that are relevant to the selected step in the test tree.

5.1.2 To add a checkpoint while editing your test:
5.2.2.1 From Test Tree
Right-click the step in the test tree where you want to add the checkpoint and choose Insert Standard Checkpoint.
5.2.2.2 From the Active Screen
Right-click any object in the Active Screen and choose Insert Standard Checkpoint. This option can be used to create checkpoints for any object in the Active Screen (even if the object is not part of any step in your test tree).
5.3 Types of Checkpoints
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.
5.3.1 QuickTest Professional Checkpoint Types

Checkpoint Type Description
Standard Checkpoint Checks values of an object’s properties
Image Checkpoint Checks the property values of an image
Table Checkpoint Checks information in a table
Page checkpoint Checks the characteristics of a Web page
Text / Text Area Checkpoint Checks that a text string is displayed in the appropriate place in a Web page or application window
Bitmap Checkpoint Checks an area of a Web page or application after capturing it as a bitmap
Database Checkpoint Checks the contents of databases accessed by an application or Web site
Accessibility Checkpoint Identifies areas of a Web site to check for Section 508 compliancy
XML Checkpoint Checks the data content of XML documents

5.3.2 Creating a Standard Checkpoint

· Click the Insert Checkpoint toolbar button or choose Insert > Checkpoint > Standard Checkpoint.
· Click the object you want to check. The Select an Object dialog box opens.
· Select the item you want to check from the displayed object tree.
· Click OK. The Checkpoint Properties dialog box opens.
· Specify the settings for the checkpoint.
· Click OK to close the dialog box.
5.3.3 Creating a Text Checkpoint
· Display the page, window, or screen containing the text you want to check.
· Choose Insert > Checkpoint > Text Checkpoint, or click the arrow next to the Insert Checkpoint button and Choose Text Checkpoint.
· The QuickTest window is minimized and the mouse pointer turns into a pointing hand.
· Click the text string for which you want to create the checkpoint. If the area you defined is associated with more than one object, the Object Selection–Text Checkpoint
Properties dialog box opens. Select the required object
· The Text Checkpoint Properties dialog box opens.
· Specify the checkpoint settings.
· Click OK to close the dialog box.

5.4 Use regular expressions

Regular expressions enable QuickTest to identify objects and text strings with varying values.

You can use regular expressions when:
· Defining the property values of an object
· Parameterize a step
· Creating checkpoints with varying values
For example, if a window titlebar's name changes according to a file name, you can use a regular expression to identify a window whose titlebar has the specified product name, followed by a hyphen, and then any other text.
A regular expression is a string that specifies a complex search phrase. By using special characters such as a period (.), asterisk (*), caret (^), and brackets ([ ]), you can define the conditions of a search. When one of these special characters is preceded by a backslash (\), QuickTest searches for the literal character.
5.4.1 To define a constant property value as a regular expression:
· Open the Object Properties dialog box for the object either form test tree or from Active Screen or from Object Repository
· In the Property column, select the property you want to set as a regular expression.
· In the Edit value section, click Constant.
· Click the Edit Constant Value Options button. The Constant Value Options dialog box pens.
· Select the Regular Expression check box.
· In the Value box, enter the regular expression syntax for the string.
· Click OK to close the Constant Value Options dialog box.
· Click OK to save and close the Object Properties
5.4.2 To parameterize a property value using regular expressions:
Covered in Data Driving a Test
5.4.3 To define a regular expression in an object checkpoint:
· Display the page, window, or screen containing the text you want to check.
· Choose Insert > Checkpoint > Text Checkpoint, or click the arrow next to the Insert Checkpoint button and choose Text Checkpoint.
· Click the text string for which you want to create the checkpoint.
· Select the object for which you are creating the checkpoint. The Text Checkpoint Properties dialog box opens.
· In the Edit value section, click Constant.
· Click the Edit Constant Value Options button. The Constant Value Options dialog box opens.
· Select the Regular Expression check box.
· In the Value box, enter the regular expression syntax for the string.
· Click OK to close the Constant Value Options dialog box.
· Click OK to save and close Text Checkpoint Properties dialog box.

5.4.4 Common options to create regular expressions.

. Matching Any Single Character
[xy] Matching Any Single Character in a List
[^xy] Matching Any Single Character Not in a List
[x-y] Matching Any Single Character within a Range
* Matching Zero or More Specific Characters
+ Matching One or More Specific Characters
? Matching Zero or One Specific Character
( ) Grouping Regular Expressions
| Matching One of Several Regular Expressions
^ Matching the Beginning of a Line
$ Matching the End of a Line
\w Matching Any AlphaNumeric Character Including the Underscore
\W Matching Any Non-AlphaNumeric Character

You can combine regular expression operators in a single expression to achieve the exact search criteria you need.
Back to top Go down
http://knowledgeshare.forumotion.com
 
QTP Notes
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» I won the Grand Prize (iPad) THANK YOU ALL!!!
» Are tannins your trigger? I'd like to compare notes.
» [SOLVED] snipping tool & sticky notes shortcut missing

Permissions in this forum:You cannot reply to topics in this forum
Knowledge Share :: Testing :: Automation-
Jump to: