Use ScriptAssure®, you can play back scripts successfully even when the application-under-test has been updated.
Each object in a test object map has a set of recognition properties, which are typically established during recording. For example, a button has five recognition properties: name, type, role, class, and index. To find an object in the application-under-test during playback, Rational Functional Tester compares the object in the application with recognition properties in the test object map.
Each property of a test object has an associated recognition weight value, which is a number from 0 to 100. Rational Functional Tester uses the weight value for each recognition property to determine the importance of the property. For example, the name, type, role, and class recognition properties of the button object have a weight of 100; the class recognition property has a weight of 50.
Rational Functional Tester uses criteria to assign a recognition score to objects in the application-under-test. For example, if the object exactly matches the recognition properties in the test object map, its score is 0. If the object has one property with a weight of 100 that does not match, its score is 10,000. If the object has two properties that do not match, its score is 20,000, and so on. The higher the recognition score, the less exact the match.
For Rational Functional Tester to recognize an object in the application-under-test, the object properties must match the properties recorded in the test object map. If the object properties do not match and the weight of the recognition property is less provided that their score lies within 10,000, Rational Functional Tester still proceeds with the test. If the score exceeds the value of 10,000 but less than the default threshold of 20,000, Rational Functional Tester writes a weak recognition warning to the log.
You can also enter values to set thresholds for recognition scores, such as the maximum acceptable recognition score, last chance recognition score, ambiguous recognition scores difference threshold, and warn if accepted score is greater than. During playback, the recognition scores for a test object's recognition properties are added and the total compared to the thresholds set in the ScriptAssure Page.
If objects in the application-under-test have changed, you can still play back scripts in Functional Tester by using the ScriptAssure feature to control object-matching sensitivity.
You can use ScriptAssure in two ways:
Standard -- The ScriptAssure Page-Standard controls object-matching sensitivity during playback by using a slider control. To set the tolerance for differences between the object in the application-under-test, you move the Recognition Level slider between Strict and Tolerant. To find differences between the object and the recognition properties, you move the Warning Level slider between High and None.
Advanced -- The ScriptAssure Page-Advanced sets thresholds for recognition scores. You can set a maximum score to consider a test object as a candidate for recognition; you can also request warnings when candidate objects have a score higher than the designated threshold.
Tips for using ScriptAssure
- If you want the script to play back faster and with fewer warnings, set the thresholds high. The recognition is less fussy but more prone to error. This behavior might be useful in some situations.
- If recognition is weak, examine your test object map. Have accessible names changed? (For example, is "Place Order" now "Place Your Order?") If the application has changed permanently, update the test object map to reflect the change. In an internationalization situation, change the label of the test object, not its accessible name.
- If the application has a dynamic object or if several versions of the application are slightly different, correct versions of an object, replace the recognition property with a regular expression. You can also use a numeric range to accept more than one value of a property. For information, see Replace an Exact-Match Property with a Pattern.
- If it is late in the development cycle and you are doing maintenance, verify that your scripts work and have the best possible recognition by setting the warning level to High. You will receive warnings about possible problem areas, and if you do, fix the map.
Ambiguous object recognition in functional testing
Screen snapshot on playback failure of functional tests
Pausing or stopping script playback