The Update Options tab contains the Update test object descriptions check box. Selecting this option instructs QuickTest to update the test object descriptions for your business component according to the properties currently defined in the Object Identification dialog box for each object class. You can use this option to modify the set of properties used to identify an object. When you use this option, all values are updated, even if they are parameterized or use regular expressions.
Tip: You can also update individual test object descriptions from the object in your application using the Update from Application option in the Object Repository window or Object Repository Manager.
Note: If the property set you select in the Object Identification dialog box for an object class is not ideal for a particular object, the new object description may cause future runs to fail. Therefore, it is recommended that you save a copy of your component before updating it, so that you can return to the previously saved version, if necessary.
This option can be especially useful when you want to record and debug your component using property values that are easy to recognize in your application (such as object labels), but may be language or operating system dependent. After you debug your component, you can use the Update Run Mode option to change the object descriptions to use more universal property values.
For example, suppose you design a component for the English version of a part of your application. The test objects are recognized according to the test object property values in the English version, some of which may be language dependent. You now want to use the same component for the French version of this part of your application.
To do this, you define properties that are non-language dependent. These properties will be used for object identification. For example, you can identify a link object by its target property value instead of its text property value. You can then perform an update run on the English version of this part of your application using these new properties. This will modify the test object descriptions so that you can later run the component successfully on the French version of your application.
Tip: If you have a component that runs successfully, but in which certain objects are identified using Smart Identification, you can also use the Update test object descriptions option to update the test object description property values.
When you run the component with Update test object descriptions selected, QuickTest finds the test object specified in each step based on its current test object description. If QuickTest cannot find the test object based on its description, it uses the Smart Identification properties to identify the test object (if Smart Identification is enabled). After QuickTest finds the test object, it then updates its description based on the mandatory and assistive properties that you define in the Object Identification dialog box.
Note: Test objects that cannot be identified during the update process are not updated. As in any run session, if an object cannot be found during the update run, the run session fails, and information about the failure is included in the Test Results.
Any properties that were used in the previous test object description and are no longer part of the description for that test object class, as defined in the Object Identification dialog box, are removed from the new description, even if the values were parameterized or defined as regular expressions.
If the same property appears both in the test object's new and previous descriptions, one of the following occurs:
- If the property value in the previous description is parameterized or specified as a regular expression and matches the new property value, QuickTest keeps the property's previous parameterized or regular expression value. For example, if the previous property value was defined as the regular expression button.*, and the new value is button1, the property value remains button.*.
- If the property value in the previous description does not match the new property value, but the object is found using Smart Identification, QuickTest updates the property value to the new, constant property value. For example, if the previous property value was button.*, and the new value is My button, if a Smart Identification definition enabled QuickTest to find the object, My button becomes the new property value. In this case, any parameterization or use of regular expressions is removed from the test object description.
No comments:
Post a Comment