Flex custom control support for Proxy SDK wizard
Rational® Functional Tester supports testing functional aspects of Adobe® Flex custom controls in a generic and specific way. Proxies can be created and deployed using the proxy SDK wizard. Certain changes must be done regarding the base class for proxy and the test object. These are given in the sample proxy and test object. Once the deployment is done and the proxy is mapped to the control, you can test the specific control. You can extend Rational® Functional Tester capabilities by using the Proxy SDK wizard to test the Flex custom control.
Before you begin
- Copy the contents of ClassInfo tag in the FlexCustom.xml file available in the sample directory into the FlexEnv.xml file in the bin directory of the product install.
- Create a file without extension in C:\WINDOWS\system32\Macromed\Flash\FlashPlayerTrust. Add the path of the application directory into this file.
About this task
If you want to map a specific control to a proxy and have the data verification point and the dataset support, the specific custom control support helps you achieve it. The basic requirements are:
- You must write a delegate for the custom control and map the events and properties in the FlexEnv.xml file. Delegate is an actionscript class which allows automation framework to understand the events from the control. References are available in Flex Builder directory where a delegate exists corresponding to each standard control. For more information see, Flex Data Visualization Developer's Guide in the Adobe site.
- Creating a proxy project and a test object. Associate the proxy and the test object with the control for which the proxy is written. The attached project has .jar containing the FlexCustomControlProxy and FlexCustomControlObject.
- You must map the proxy to the control in the *.rftcust file generated using the proxy SDK wizard.
Main features of specific support for Flex custom control:
About this task
- Control is mapped to a more meaningful proxy and test object. For example, FlexCustomControl control gets mapped to FlexCustomControlProxy and FlexCustomControltestObject
- Role can be assigned to the control. For example, the given custom control has role “List? assigned to it.
- Recognition properties can be added.
- Data verification point and data driven test can be implemented.
- Recording is control specific. For example, you now record on
the same control:
list__FlexCustomControl_FlexCustomControl1().select("Food");
getMethodSpec
method is overridden to emit the methods as required otherwise it goes to superclass and event might be generated asperformAction()
. See FlexCustomControlProxy.javagetTestObjectClassName
method must be overridden to point to the correct test object.