Flex custom control support

IBM Rational Functional Tester supports testing functional aspects of Adobe Flex custom controls in a generic and specific way.

IBM Rational Functional Tester support Flex custom controls in two different ways:

  1. Generic support: IBM Rational Functional Tester supports recording and playback of scripts. Recording is generic and methods are recorded as performAction(“eventname”, “arg1”…”arg4”);. For example, flex__randomWalk_RandomWalk1().performAction("Select", "Food");

    IBM Rational Functional Tester cannot capture data verification point and does not support data-driven testing in generic support. Data verification point is achieved using the getProperty() method and by verifying the value. For example:

    String selectedItem = (String)list__randomWalk_RandomWalk1().getProperty("selectedItem");
    String verificationData = "TestVerify";
    //code to do
    Data-driven testing is supported by using an action and associating the argument value with a datapool. Since data-driving is control specific, a generic method is not available using drag-hand. For example,
    flex__randomWalk_RandomWalk1().performAction("Select",dpString( variableName/index)); 

    For IBM Rational Functional Tester to support Flex custom control in a generic way:

    1. You must write a delegate for the custom control. 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.

    2. Map the custom control with its events and properties in FlexEnv.xml file located in the bin folder of the IBM Rational Functional Tester install directory

    3. Every new custom control is mapped to the base proxy flexObjectProxy, and base test objects are mapped to FlexObjectTestObject.

  2. Specific support: Proxy and test objects are created. The proxy is mapped to the control in the .rftcust file that is generated while creating the proxy using the proxy SDK wizard. Data verification point and data drive is created in the new proxy as required. Role are assigned to the control. Recognition properties are added to the control.

Related concepts

Flex applications testing process

Flex support

Test Rational Functional Tester enabled Flex applications

Test Flex applications that are not enabled using Rational Functional Tester