The first thing you need to do is to install Ruby, using the one-click installer.
Install FunFX
The first thing you need is to get Flex Builder from Adobe, and the FunFX zip file located at Rubyforge. The FunFX zip file contains three files;
- AutomationGenericEnv.xml
- FunFXAdapter.swc
- FunFX-0.0.x.gem
To get things to workyou will need additional three files, but they are part of the Flex 3 SDK (with Flex 2 SDK these files are bundled with Flex Data Services and the automation package, but you will be able to get the files from Flex 3 SDK) ;
- automation_agent_rb.swc
- automation_agent.swc
- automation.swc
The automation_agent_rb.swc must be located in the language folder in use in the locale folder. In the Flex SDK 3 version this file is already in place in the correct folder.
The FunFX gem file must be installed locally on your computer. It does not exist in any public repository yet, so you must choose the local gem file located in the FunFX zip file.
gem install FunFX-0.0.x.gem
All the other files will be used when creating the Flex project, which I will begin explaining now. I will explain using Eclipse as the IDE.
Creating a new Flex Project
The first thing is to create the Flex project of choice. Then you must add the AutomationGenricEnv.xml to the root path of the project or just add it directly to the bin catalog or the output folder of choice. The adapter uses this file to build the automation environment of all display objects.
To be able to take advantage of the FunFXAdapter file you must add it as a compiler option as shown in the picture below. The adapter is relying on the files automation_agent.swc and the automation.swc files, and thus they must also be added as a compiler option.
Notice
I have tried to add these swc files as swc files in the build path but this does not work. I am not really sure why this is, so if anybody has any comments on this fact please let me know.Now your application is ready to be tested. Remember to be consistent with giving all your display object uniq id's and the testing will be more efficient.
Notice about different versions of Flex SDK's. It seems that Flex projects does not like swc files that is compiled with different SDK versions. Due to this the precompiled versions of the FunFXAdapter.swc that is supplied with the FunFX zip file might not work with your application (the version out now ,FunFX version 0.0.2 is compiled with Flex SDK version 3.0.0). If this happens, download the source code and compile your own version.