To test Flex Application with any automated testing tool (like QTP), automation libraries should be included in the application SWF file to make the application testable. Flex Automation libraries are not part of the Flex SDK, these comes with Flex Builder 3. If you are using Flex SDK and ANT as build tool, you need to perform following steps to compile your application.
- Copy flex automation libraries (automation.swc, automation_agent.swc, automation_dmv.swc, automation_flashflexkit.swc) from Flex Build 3 installation (/frameworks/libs) to your local directory (let say C:\flex-automation).
- Copy automation tool library (qtp.swc in case if you are using QTP as testing tool) in C:\flex-automation
- Copy flex agents (automation_agent_rb.swc, automation_rb.swc) in C:/flex-automation/locale/en_US. Flex agent facilitates communication between a flex application and an automation tool.
- Copy FLEX_HOME/frameworks/flex-config.xml to flex-config-auto.xml and keep it in same directory (FLEX_HOME/frameworks)
- Add following entries in include-libraries section of flex-config-auto.xml
- <include-libraries>
<library>C:/flex-automation/automation.swc</library>
<library>C:/flex-automation/automation_agent.swc</library>
<library>C:/flex-automation/automation_dmv.swc</library>
<library>C:/flex-automation/automation_flashflexkit.swc</library>
<library>C:/flex-automation/qtp.swc</library>
</include-libraries> - In mxmlc task of ant build file specify load-config path as
- <load-config filename="FLEX_HOME/frameworks/flex-config-auto.xml"/>
- Add compiler-library-path in mxmlc task
- <compiler.library-path dir="C:/flex-automation" append="true">
<include name="locale/en_US" />
</compiler.library-path>
<mxmlc file="${APP_ROOT}/Main.mxml" output="${build.dir}/main.swf">
<load-config filename="${FLEX_HOME}/frameworks/flex-config-auto.xml"/>
<source-path path-element="${FLEX_HOME}/frameworks"/>
<compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
<include name="libs" />
<include name="locale/en_US" />
</compiler.library-path>
<compiler.library-path dir="${FLEX_AUTOMATION_HOME}" append="true">
<include name="locale/en_US" />
</compiler.library-path>
</mxmlc>
mxmlc ANT task comes with flexbuilder3 and flex sdk. In flex builder, the location of task is : _FLEX_BUILDER_INSTALL_LOCATION_\sdks\3.0.0\ant\flexTasks.jar
To use this ant task in ant build file use ant taskdef task as below:
< taskdef resource="flexTasks.tasks" classpath="_PATH_TO_TASK_/
11 comments:
Hi....
its really a nice info.
But where can i find the ANT task?
I ma using mvn and jetty server.
How can i configure for that?
please help me in this regard.
Thanks,
Naren
Naren,
ANT task comes with flexbuilder3 and flex sdk.
In flex builder, the location of task is : _FLEX_BUILDER_INSTALL_LOCATION_\sdks\3.0.0\ant\flexTasks.jar
To use this ant task in ant build file use ant taskdef task as below:
<taskdef resource="flexTasks.tasks" classpath="_PATH_TO_TASK_/flexTasks.jar"/>
Information on this task is available @ http://livedocs.adobe.com/flex/3/html/help.html?content=anttasks_1.html
unable to edit mxmlc class file please provide details on last 5 steps
thank you
Hi Naren,
I am new to Flex testing with QTP. Can you pls give me whole details how ill go an d test the flex application with QTP. pls mention every step as a Beginner.
Please send me a mail.
Thanks a lot for help.
Thanks,
Monika
monikasri11@gmail.com
Hi Naren,
I am new to Flex testing with QTP. Can you pls give me whole details how ill go and test the flex application with QTP. pls mention every step as a Beginner.
Please send me an mail.
Thanks a lot for your help in advance.
Thanks,
Murali
konijeti2@gmail.com
Hi,
Can i run ANT in GUI Mode... like while Jmeter start running..
I want to generate graph.. so i'm asking it..
Any suggestion..?
Thanks
Neerajkumar
Hi Neeraj,
I am not clear with your question. Do you mean to run ANT by Jmeter UI.
-Vishnu
Hi Vishnu,
Thanks for your reply
Yes,
When i run JMeter, i should get ANT report (HTML) with Jmeter's Graph also.
Thanks,
Neerajkumar
Hi Naren,
I am new to Flex testing with QTP. Can you pls give me whole details how ill go and test the flex application with QTP. pls mention every step as a Beginner.
Please send me an mail.
Thanks a lot for your help in advance.
Thanks,
Pavan
pavan790@gmail.com
and what if the flex application is in a link (web page) how could i automate
Please help.
Note: I'm using UFT 11.5
Post a Comment