Using ScriptAssure
Using 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, HCL DevOps Test UI (Test UI) 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. Test UI 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.
Test UI 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 Test UI 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, Test UI still proceeds with the test. If the score exceeds the value of 10,000 but less than the default threshold of 20,000, Test UI 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 Test UI 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.