This proxy sample explains how to create a simple proxy
class and a new TestObject for a CheckBox control
Extended Capabilities: Creating a new TestObject
In
this sample, you create a new TestObject and map it to CheckBoxProxy
proxy to add the check() and uncheck() methods.
This proxy extends the public String getTestObjectClassName() proxy
method to return the canonical name of the newly created TestObject
so that all javax.swing.JCheckBox controls have new TestObjects.
Note: You
create a new TestObject only when you want the control to expose new
methods that are not available in the existing Functional Tester TestObject.
Deploy the binary files
Copy the CheckBoxProxy.jar, CheckBoxProxy.rftcust, ExtendedToggleGUITestObject.jar,
and ExtendedToggleGUITestObject.rftcust files to
the customization directory and restart Functional Tester to test the sample application-under-test
(AUT).
Note: You must manually add the ExtendedToggleGUITestObject.jar file
to the Rational Functional Tester project,
if a compilation error is displayed in the Rational Functional Tester script for the check box control.
Verify the proxy and TestObject deployment
You
can test the javax.swing.JCheckBox control, which the CheckBoxApp
AUT provides.
- Before you deploy the proxies, the administrative property values
for the checkbox TestObject are as follows:
Table 1. Administrative property |
Value |
Proxy Class Name (#proxy) |
.java.jfc.JCheckBoxProxy |
Test Object Class Name (#testobject) |
ToggleGUITestObject |
- After you deploy the proxies, the administrative property values
change to the following for the checkbox TestObject:
Table 2. Administrative property |
Value |
Proxy Class Name (#proxy) |
SDK.Sample.ExtendedCheckBoxProxy |
Test Object Class Name (#testobject) |
ExtendedToggleGUITestObject |
Verify the new TestObject capability
- Before you deploy the proxies, the check() and uncheck() methods
are unavailable for the checkbox TestObject.
- After you deploy the proxies, the check() and uncheck() methods
are available for the checkbox TestObject.