Mapping proxies to controls
Functional Tester identifies each application under test (AUT) control by its class name. Running the testObject.getProperty(".class") method in the test script gives you the class name. The mapping is established through the class names of the respective control and ProxyObject.
Before you begin
To map proxies to controls, explicitly map newly developed ProxyObjects to a control or group of controls through an external map file called customization files with the .rftcust extension. Functional Tester refers these customization files and creates ProxyObject instances for a control as specified in the mapping. You must create your own customization file to specify the mapping information between the ProxyObject and the control. You can deploy the newly created customization file by saving it in the Functional Tester customization directory.
To map a proxy class to an AUT control class, add the ClassName and UsedBy tags within the DomainImplementation start and end tags.
You must add your proxy class name within the ClassName tag and the name of the AUT class that the proxy represents within the UsedBy tag.
ExampleThe following is an example of a mapping entry in the customization file:<DomainImplementation L=".DomainImplementation"> <Name>Java</Name> <ClassName>com.rational.test.ft.domain.java.awt.JSpinnerProxy</ClassName> <Replaces/> <UsedBy>java.awt.JSpinner</UsedBy> </DomainImplementation>
What to do nextWhile updating the customization file, make sure that the file meets the following conditions:
- Make no typing mistakes while specifying the class. The strings are case sensitive.
- Use fully qualified class names. Use the complete class name including the package separated with a period (.).
- Match the domain type of the proxy to the section in the customization file by name.
- Use an appropriate XML format:
- Nest start and end tags properly.
- Specify names for tags (case is significant).
- Customization file
You can specify extensible components such as proxies, TestObjects, values, and value managers in an external customization file with the .rftcust extension. After the files are deployed, these extended components become part of the Functional Tester framework. The main customization file, rational_ft.rftcust is located in the Functional Tester installation directory or the customization directory.
Create a proxy class
Add more control properties
Add more data types for a control
Enhancing the recording behavior
Enhancing the recording behavior with SubItems
Extending data driving
Change the role of a control
Modifying the recognition properties and weight of a control
Change the mappability of a control
Deploy a proxy
Debugging the proxy code