A blog about software development and other software related matters

Blog Archive

Monday, April 21, 2008

Making FunFx Flex 2 compatible

Moving to the latest and greatest software version in the enterprise takes time, Flex 3 came out not long ago and so did FunFx which a really cool tool for Flex integration testing.
FunFx got compiled with Flex 3 SDK which means that it won't run with Flex 2 projects out of the box, the developer does states that its possible to compile it from source with Flex 2 SDK however the procedure isn't trivial and took me some trial and error that i hope to save for the rest of you out there.
In order to get a Flex 2 compatible FunFx will need to compile the FunFxAdapter which is a swc library that any testable RIA has to depended upon, go ahead and grab its source from here, create a swc project within Flex builder called FunFxAdapter and add the source.
Now open the project properties and add in the following dependencies to the compiler options (your paths may vary):

 
-include-libraries "/Applications/eclipse 3.2.2/Adobe Flex Builder 3 Plug-in/sdks/2.0.1/frameworks/libs/automation.swc" "/Applications/eclipse 3.2.2/Adobe Flex Builder 3 Plug-in/sdks/2.0.1/frameworks/libs/automation_agent.swc"

The compiler options should look like:



Unfortunately the FunFxAdapter project depends upon the automation.swc library which was not a part of the Flex 2 SDK (it was introduced in Flex 3 SDK but this version isn't binary compilable with Flex 2 SDK), if your project is a legacy Flex 2 project than its most likely that you have access to this swc.
Compile the project and grab the compiled swc from the bin folder of the project, when adding it to the test target application you'll need to add some more dependencies in order to make it work with the compiled FunFxAdapter swc:
 
-include-libraries "/Users/ronen/Documents/workspace/FunFXAdapter/bin/FunFXAdapter.swc" "/Applications/eclipse 3.2.2/Adobe Flex Builder 3 Plug-in/sdks/2.0.1/frameworks/libs/automation.swc" "/Applications/eclipse 3.2.2/Adobe Flex Builder 3 Plug-in/sdks/2.0.1/frameworks/libs/automation_agent.swc" "/Applications/eclipse 3.2.2/Adobe Flex Builder 3 Plug-in/sdks/2.0.1/frameworks/locale/ja_JP/automation_agent_rb.swc"

hopefully iv saved your valuable time.
After publish comment:
Iv forgot to mention that you should add the AutomationGenericEnv.xml file to the src directory of the main project module and to the application folder under tomcat (a standard FunFx requirements also in the Flex 3 version).

No comments: