Value Configuration Overview
Quickest enables you to configure the values for properties and other items by defining a value as a constant or a parameter. You can also use the “regular expressions” for some values to increasing the flexibility & adaptability of your tests. For details on regular expressions, see Regular Expressions Overview.
Some dialog boxes, such as the Checkpoint Properties dialog boxes, include a Configure value area, which you can define the value for a selected item as a constant or a parameter. In other contexts, such as the Keyword View, Step Generator, and Object Repository window, you can select a value directly and parametrize it or define it as a constant.
Constant. A manually defined value that remains unchanged for the duration of the test. In certain contexts, you can define a constant value using a regular expression.
Parameter. A value that is defined or generated externally and is retrieved during a run session. For example, a parameter value may be defined in an external file or generated by QuickTest.
When you define a value as a parameter, you can also specify other settings according to the parameter type. For more data on using parameters in your tests, see Parameterizing Values.
Regular Expressions Overview
A regular expression is the string of that specifies a complex search words. Through using particular characters, such as period (.), caret (^), asterisk (*), & brackets ([ ]), you can defined the condition of a searching.
Regular expressions are used to describe objects & text string varying with variable values. You can use regular expressions to instruct Quick test to find a value that matches a particular pattern or condition instead of a specific hard-coded value.
Use case examples
Whenever a QuickTest feature supports regular expressions, the relevant QuickTest dialog box includes a Regular Expression check box. Selecting this check box teaches QuickTest to deal the provided value as a regular expression. Some dialog boxes that contain a Regular Expression check box, also contain a right arrow adjacent to the text box for the value. Clicking this arrow enables you to select regular expression characters from a drop-down list, and to test your regular expression to make sure it suits your needs. For more information, see Smart Regular Expression List and Regular Expression Evaluator.
The following are some examples of situations in which you can use regular expressions:
- When defining the belongings values of an objective in dialog boxes and in programmatic explanation
- When defining expected variables for checkpoints
- When defining pop-up window situations in a recovery scripts
You can use the regular expressions only for values of type string.
For details on defining regular expressions, including regular expression syntax, see Regular Expression Characters and Usage Options.
This section also includes:
- Regular Expressions for Property Values
- Regular Expressions in Checkpoints
Regular Expressions for Property Values
If you expect the value of an object property in your application to change in certain path during each run session, you can use the regular expression when defining identification property values, for example, in the Object Repository window, or in programmatic descriptions. For more information on programmatic descriptions, see Programmatic Descriptions.
For example, your Web site may include a form in which the end user inputs information & clicks on the Send button to submit the form. When a required field is not complete, the form is a show again for the end user is completed. When feeding back the form, the end user clicks on the resend button. You can define the value of the button name property as the regular expression, so quick Test ignores this variation in the button name when identifying the button in your application.
Tip: QuickTest provides a tool to test your regular expressions to help you make sure that they suit your needs. For more information, see Regular Expression Evaluator. QuickTest provides a list of commonly used regular expression characters that you can select when creating a regular expression. For more information, see Smart Regular Expression List.
Regular Expressions in Checkpoints
When creating a criterion checkpoint to conform the property values of object, you can sets expected value of the object property as the regular expression so that an object with a varying the value can be verified.
For example, suppose you need to checks every window & dialog box in your application include the name of your application followed through a hyphen (-) & an explained title. You can adds checkpoint for each dialog box object in your test to check that the firstly the part of the title is includes the name of your application followed via a “hyphen”.
When developing a text checkpoint to checks a varying text string is displayed on your application, you can defined text string as the “regular expression”.
For example, when booking a flight in the “Mercury Tours” sample Website, the final cost charged to a credit card no. should not be less than $300. You can define the cost as a regular expression, so that QuickTest will ignore variation in the text string as a long as value not is less than $300.
You can implement the same rules to any checkpoint type whose dialog box includes a”Configure Value” area same to that described in Configure Value Place.
For example, for table checkpoints you can sets the cell values as the regular expressions, & for XML checkpoints you can sets the attribute and element values as the regular expressions. For extra information on specific checkpoint characters, see the applicable section for the checkpoint type.Tip: QuickTest provides a tool to test your regular expressions to help you make sure that they suit your needs. For more information, see Regular Expression Evaluator. QuickTest provides a list of commonly used regular expression characters that you can select when creating a regular expression. For more information, see Smart Regular Expression List.