How to use unregisterAll method in a Rational Functional Tester script
How can you explicitly unregister any bound reference in an IBM Rational Functional Tester script that was created when a Java script uses dynamic find?
When you run a long script that heavily uses dynamic find, you want to avoid the following issues.
- Error message
Spy heap is locked.
- Playback halts before completion.
- Abnormal end of IBM Rational Functional Tester.
- To run out of memory.
- Other unexpected messages.
Helper script methods refer to an object in the application under test (AUT). For this the methods use the test object map. IBM Rational Functional Tester finds such mapped objects each time the script calls a method on the object.. In some cases; however, you do not want Rational Functional Tester to find mapped objects.
unregisterAll(). Consider the following examples how to invoke this method at appropriate places in the test script.
You want to call many methods directly on the same object. In this case you can use the
TestObject.find() method to find an object. See the following sample code.
In this example
TestObjectdiscovers the test object with a
findmethod and returns to an array of the test object. When the method finds the object, the method casts into a
GUITestObjectand performs a click. This code discovers the test object dynamically, the test object dynamically. In other words, you do not use no mapped test objects. Now you need explicitly unregister any bound references that you created as soon as you do not need these references any more. Otherwise this might leads into memory issues , such as Spy Heap is Locked and out of memory error.
The script explicitly calls unregister the bound references of the HTML Button using
unregisterAll(). RationalTestScript contains several methods that remove references to TestObjects, including
unregisterAll. See the Rational Functional Tester API Reference for information about these methods.
Here you want to select a sub-item from the drop down list or combo box. whether you find a sub-item or not, you still need to unregister any bound references explicitly.
Now you discover an SAP
TestObject based on a set of Properties. Whether you find a test object successfully or not, you still need to clear up the bound references with
Note: Act cautiously, when you deal directly with test objects that contain references to objects in the application-under-test. If you do so, the AUT might become unstable. Unregister these test objects as soon as possible.
More support for:
Rational Functional Tester
Software version: 6.1, 220.127.116.11, 6.1.1, 18.104.22.168, 7.0, 22.214.171.124, 126.96.36.199, 188.8.131.52, 7.0.1, 184.108.40.206, 220.127.116.11, 18.104.22.168, 8.0, 22.214.171.124, 126.96.36.199, 188.8.131.52, 184.108.40.206, 8.1, 220.127.116.11, 18.104.22.168, 22.214.171.124, 8.1.1, 126.96.36.199, 188.8.131.52, 184.108.40.206, 8.2, 220.127.116.11, 18.104.22.168
Operating system(s): Linux, Windows
Reference #: 1507963
Modified date: 05 August 2011