Extending proxies
Functional Tester needs UI control-specific information to perform functional testing operations such as recording, playback, verification points, and data driving. It tries to map the closest proxy if it finds a new control for which it has no proxy.
The Functional Tester architecture enables developers to write a proxy for a particular UI control. Developers can enable Functional Tester to process the specifics of a control by writing proxies. Relevant functional testing capabilities can also be provided.
Proxies provide Functional Tester with details about a control for which it is written. Functional Tester has a predefined set of methods for any proxy and calls each method to get specific details. For any proxy written for a control, these predefined methods are implemented specific to the control.
For any control, Functional Tester provides a set of properties and data types for verification. If the currently provided set of properties and data types is not enough to test the control, a new proxy can be created and by overriding certain methods more properties or data types can be included. The recording behavior of Functional Tester can also be changed by creating new proxies.
- Create a proxy class
You can write a ProxyObject class either in Java or C#, depending on which control you are developing the proxy for. Creating a new ProxyObject class is similar to creating a new Java or C# class extending the respective base ProxyObject class.- Add more control properties
Functional Tester provides a set of control properties for access and property verification. You can add more control properties by extending the getProperties() and getProperty() APIs.- Add more data types for a control
Functional Tester provides a set of control data types for data verification point. You can add more control data types by extending the getTestDataTypes() and getTestData() APIs.- Enhancing the recording behavior
You can enhance the recording behavior for a user action on a control by extending the processMouseEvent() API. Functional Tester framework calls the processMouseEvent() API when a mouse event happens on a control. The processMouseEvent() API tells the Functional Tester framework which method has to be recorded for the mouse action.- Enhancing the recording behavior with SubItems
SubItems are Functional Tester defined portions of a control under test. In some cases you get best results by recording the user interaction with SubItem details rather than recording just with the coordinate information. The disadvantage of using the coordinate information is that when portions of a control are resized or rearranged, playing back the user actions might not return the same results.- Extending data driving
You must implement the GetDataDrivableCommand() method in the proxy to add data driving support to a control. This method returns a method specification to implement data driving support for a control. While using the data driving wizard, the method specification that GetDataDrivableCommand() returns is sent to the test script. Proxies can override and return any method that you specify for data driving.- Change the role of a control
The role of a control determines which icon is displayed in the Object Map for a TestObject. You can do this by extending the getRole() method and returning one of the Functional Tester predefined role values.- Modifying the recognition properties and weight of a control
Functional Tester uses recognition properties to uniquely identify a control. Various recognition properties are assigned different weights for recognition analysis. Functional Tester uses these values and weights to identify a control during playback. You can customize the recognition properties and the weights that best suit the controls you are testing.- Change the mappability of a control
There are certain types of controls in applications under test (AUT) that do not need to be exposed as a TestObject. For example, container controls have no useful testing value and are not exposed. Functional Tester needs these container controls to run certain methods to retrieve information about their children.- 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.- Deploy a proxy
After you have developed the proxy binary and customization files, deploy them for the changes to take effect.- Debugging the proxy code
Debugging the proxy code is an essential part of the proxy development process for problem determination. The proxy code containing the JAR file or .Net assembly file with the .dll extension is loaded into the application under test (AUT) process. To debug the proxy code, attach the respective debugger to the AUT process after the proxy binary files are loaded into the AUT.
Related concepts
Current level of proxy support that Functional Tester provides
Developing proxies using the Proxy SDK wizard
Related tasks