Current level of proxy support that HCL OneTest UI provides

To develop proxies for a control, you must understand the current level of support that HCL OneTest™ UI 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 HCL OneTest UI installation directory () (C:\Program Files\HCL\HCLProducts\FunctionalTester\bin) or the customization directory (C:\ProgramData\HCL\HOTUI\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 HCL OneTest UI. 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 HCL OneTest UI is currently using to test this control.

Additional information

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 hierarchy

java.lang.Object
     java.awt.Component
         java.awt.Container
             javax.swing.JComponent
                 javax.swing.text.JTextComponent
                     javax.swing.JTextField
                         javax.swing.JFormattedTextField

HCL OneTest UI 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.
  • HCL OneTest UI 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: HCL OneTest UI 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 HCL OneTest UI.
  • 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 HCL OneTest UI proxy API reference Guide.

The following list represents the JTextProxy (Functional Tester ProxyObject) inheritance hierarchy

ProxyTestObject
  JavaProxy
    JavaGuiProxy
      awt.ComponentProxy
        jfc.JComponentProxy
          jfc.JfcGraphicalSubitemProxy
            jfc.JScrollPaneProxy
              jfc.JTextProxy
Feedback