Current level of proxy support that Functional Tester provides
To develop proxies for a control, understand the current level of support that Functional Tester provides for that control . Consider that you want to add testing support for the Java swing UI control, javax.swing.JFormattedTextField.
Verifying that a control already has a specified ProxyObject
You can identify this by looking at the customization files. All proxy and control mapping information is in the customization files, which have the extension .rftcust. Customization files are either located at the Functional Tester install directory (C:\Program Files\IBM\SDP70\FunctionalTester\bin) or the customization directory (C:\Documents and Settings\All Users\Application Data\IBM\RFT\customization).
For example, if you want to verify whether the control javax.swing.JFormattedTextField already has a ProxyObject created for it, search for javax.swing.JFormattedTextField in the customization files. If you find a map entry, it means that there is a ProxyObject specifically written for this control.
Verifying which ProxyObject is currently being used for testing a control
You can verify the ProxyObject by recording a control using Functional Tester. See the Administrative properties of the TestObject in the ObjectMap editor.
For example, open a Java application containing the JFormattedTextField control and start recording. Open the ObjectMap editor to view the Administrative properties of the TestObject representing JFormattedTextField to find which proxy Functional Tester is currently using to test this control.
To understand the current level of support better, you need some additional information on control hierarchy and customization mapping.
The inheritance hierarchy of an AUT control
The inheritance hierarchy of an application under test (AUT) control is usually found in the UI framework documentation. For example, the inheritance hierarchy of javax.swing.JFormattedTextField is available in the Java documentation.
The following list represents the javax.swting.JFormattedTextField inheritance hierarchyjava.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.text.JTextComponent javax.swing.JTextField javax.swing.JFormattedTextField
Functional Tester customization mapping entry for a proxy
Search for the mapping entry for the currently used ProxyObject in all the customization files. For example, if java.jfc.JTextProxy is the currently used ProxyObject for javax.swing.JFormattedTextField, the corresponding mapping entry is available at the rational_ft.rftcust file as follows:<Obj L=".Proxy"> <ClassName>com.rational.test.ft.domain.java.jfc.JTextProxy</ClassName> <Replaces/> <UsedBy>javax.swing.JEditorPane</UsedBy> <UsedBy>javax.swing.JTextArea</UsedBy> <UsedBy>javax.swing.JTextField</UsedBy> <UsedBy>javax.swing.JPasswordField</UsedBy> <UsedBy>javax.swing.JTextPane</UsedBy> </Obj>
This example gives you the following information:
- The java.jfc.JTextProxy is written exclusively to handle Java swing controls like JEditorPane, JTextArea, JTextField, JPasswordField, and JTextPane, but not for the javax.swing.JFormattedTextField control.
- Functional Tester picked up java.jfc.JTextProxy as the ProxyObject for testing JFormattedTextField control because JTextField is the super class for JFormattedTextField and it has java.jfc.JTextProxy as the ProxyObject.
Important: Functional Tester first looks for an explicit ProxyObject and control mapping entry for the control under test. If it fails to find one, it looks for mapping entries for any of the super classes for the control in the inheritance hierarchy.
- Because there is no ProxyObject that is written exclusively for the control javax.swing.JFormattedTextField, contol-specific properties such as formatString and unformatedValue cannot be exposed through the getProperties() method of Functional Tester.
- Here is an opportunity for proxy developers to write the JFormattedTextFieldProxy by extending java.jfc.JTextProxy exclusively for the javax.swing.JFormattedTextField control. One of methods that can be extended is getProperties() for adding control specific properties like formatString and unformatedValue.
ProxyObject inheritance hierarchy
You must also look at the proxy inheritance hierarchy as well. Proxy inheritance hierarchy information is available in Functional Tester proxy API reference Guide.
The following list represents the JTextProxy (Functional Tester ProxyObject) inheritance hierarchyProxyTestObject JavaProxy JavaGuiProxy awt.ComponentProxy jfc.JComponentProxy jfc.JfcGraphicalSubitemProxy jfc.JScrollPaneProxy jfc.JTextProxy
Proxy development environment
Developing proxies using the Proxy SDK wizard
Set up proxy projects