Configuring Flex application using tools
You can configure your Flex application for functional testing using the tools like command-line compiler and Flex Builder.
Using the command-line compiler to enable Flex applications
Developers can compile a Flex application with the HCL OneTest™ UI agent and Flex Automation Libraries from a command line and enable the application for functional testing.
About this task
Compile the Flex application using the HCL OneTest™ UI agent and Flex Automation Libraries by running the following command.
To compile and enable a Flex 4.5 application for functional testing:
At a command line, type the following command, and press Enter:"flash builder installation directory\Flash Builder 4\sdks\4.5.0\bin\mxmlc.exe"-include-libraries+="flash builder installation directory\Flash Builder 4\sdks\4.5.0\frameworks\libs\automation.swc;flash builder installation directory\Flash Builder 4\sdks\4.5.0\frameworks\libs\automation_agent.swc;flash builder installation directory\Flash Builder 4\sdks\4.5.0\frameworks\libs\datavisualization.swc;flash builder installation directory\Flash Builder 4\sdks\4.0.0\frameworks\libs\automation_spark.swc;flash builder installation directory\rftFlex4.0.swc;functional tester installation directory\rftProp_Flex4.0.swc" Test.mxml
- The above command has Flex 4.5 SDK deployed at flash builder installation directory\Flash Builder 4\sdks\ with directory as 4.5.0.
- The automation_spark.swc file has been included for Spark controls.
The default Flex Builder installation directory on Windows is C:\Program Files\Adobe.
This command is also available as a batch file with HCL OneTest™ UI installed. Testers can provide this batch file to the developer to enable the Flex application for testing. Provide the flex application source code filename as the parameter to the batch file.
The batch file is available in product installation directory\Functional Tester\Flex folder.
Example
buildapplicationwithFlex45adaptor.bat Test.mxml
or
buildapplicationwithFlex45adaptor64bit.bat Test.mxml
Using Flex Builder to enable Flex applications
Developers can use the Flex Builder to make Flex applications ready for functional testing.
About this task
Procedure
- Start Flex Builder.
- Create a new Flex project.
- Select the Flex project in the navigator.
- Click .
- Type the following argument in the Additional
compiler arguments field: For Flex 4.5:Elements in italics are variables and depend on your directory structure.Note: You can include the automation_spark.swc for Spark controls.
-include-libraries flash builder installation directory\Flash Builder 4\sdks\4.5.0\frameworks\libs\automation.swc�? flash builder installation directory\Flash Builder 4\sdks\4.5.0\frameworks\libs\automation_agent.swc�? flash builder installation directory\Flash Builder 4\sdks\4.5.0\frameworks\libs\datavisualization.swc�? flash builder installation directory\Flash Builder 4\sdks\4.5.0\frameworks\libs\automation_spark.swc functional tester installation directory\rftFlex4.5.swc functional tester installation directory\rftProp_Flex4.5.swc
- Click OK to save your changes.
- Click OK.The Properties dialog box closes.
- Compile your Flex application.