Tutorial-15 How to replace an exact match property with a Pattern using IBM Rational Functional Tester-RFT
A suggestion of great value:
Before practicing these Tutorials on “Rational Functional Tester – IBM RFT”, it is recommended that you acquire a preliminary working knowledge of using this wonderful tool –“Rational Functional Tester”. This can be easily attained by careful study of the“Frequently Asked Questions � FAQ�s” brought to you by this web site for the first time by Clicking on the following link:
Learn the Basics of RFT through FAQ’s
<<<<<<<< =========== >>>>>>>>
This article presents a simple method of replacing an exact match property with a Pattern using IBM RFT
You can replace a recognition property with a regular expression or a numeric range to allow for a pattern-based recognition. The pattern allows for more flexibility in the object recognition. You can convert properties to regular expressions or numeric ranges from within both the Verification Point Editor and the object map.
You can undo any regular expression or numeric range. After you convert a value to a regular expression or numeric range, the shortcut menu then contains an Undo command, which you can use to return to the original value.
Steps to use a regular expression from the test object map are as under:
Step – 1: Select the object in the test object map or in the Unification wizard.
Step – 2: In the Recognition Property grid in the map or in the top pane of the Unification wizard, right-click the value to change and select “Convert Value to Regular Expression”.
The value is designated as a regular expression by the blue in front of the value text.
Step – 3: Click another property in the grid, and then double-click the value so that we can edit the field.
# Alternatively, we can edit the expression in the “Regular Expression Evaluator”.
# To test our regular expression while we edit it, we can use the “Regular Expression Evaluator”. In “Step � 3”, right-click the expression, and click “Evaluate Regular Expression”.
# The “Pattern” and “Match Against Value” fields contain the current value.
# To try an expression, change the value in the “Pattern” field and click the“Evaluate” button.
# The “Result” indicates whether the expression matched.
Step – 4: Edit the value. For example, if it is a text property of “customer” we can change it as described here.
# [cC]ustomer : This syntax allows any text that contains the word “customer” with either an uppercase “C” or lowercase “c” will match. This is important because the comparisons are case-sensitive.
# We can change a case-insensitive comparison by using the Regular Expression Evaluator, or in the interface of the object map, Verification Point Editor, and Verification Point Comparator.
# In the Regular Expression Evaluator, we can set an option for case sensitivity. The“Perform Case Sensitive Match” option is on by default. Matching is case-sensitive.
# If we want matching to ignore case, we need to clear this option. We can set case sensitivity in the interface of the object map or the Verification Point Editor and Comparator.
# In these tools, when we right-click on a regular expression value, we can click “Case Sensitive Regular Expression”.
Step – 5: Click outside that cell again.
We are finished if we were in the test object map. If we used the Unification Wizard in the map, click “Next”, and click “Finish”.
Step – 6: Click “Save” in the object map