These are instructions for installing QuickTest Pro (QTP) for
Flex and building the "explorer" sample app distributed with
FlexBuilder. Note that you do not have to install FlexBuilder on
every machine with QTP, but you will at least need all of the
plug-ins mentioned below (except for the FlexBuilder plugin). You
will, of course, need the FlexBuilder plugin installed on the
machine where you will be building the application under test.
1. Remove all Flash plugins
2. Get the “Eclipse Plugin” version of
FlexBuilder 3 Beta 2 from
http://labs.adobe.com/technologies/flex/flexbuilder3/3. Install FlexBuilder
3.1. Note: this has the libraries and QTP plugin required for
automated testing.
3.2. After installation of FlexBuilder 3 BETA, you should
have the following
3.2.1. Adobe Flash Player ActiveX
3.2.2. Adobe Flash Player Plugin
3.2.3. Adobe FlexBuilder 3 Plug-in
4. Install QTP add-in for Flex
4.1. After installation of Flex Builder 3 beta 2, the QTP
add-in is located at C:\Program Files\Adobe\Flex Builder 3
Plug-in\Installers\QTP_Plugin_Installer.exe.
5. Build the ‘explorer’ sample Flex application,
including the automation libraries
5.1. Build at the commandline with flex-config.xml file
5.1.1. Modify the build configuration file by opening the
build configuration file at C:\Program Files\Adobe\Flex Builder 3
Plug-in\sdks\3.0.0\frameworks\flex-config.xml
5.1.2. Remove the XML comments symbols from the section for
the include-libraries by removing the preceeding <!-- and
appending -->
5.1.3. Make sure the following information is included:
<include-libraries>
<library>libs/automation.swc</library>
<library>libs/automation_agent.swc</library>
<library>libs/automation_dmv.swc</library>
<library>libs/datavisualization.swc</library>
<library>libs/flex.swc</library>
<library>libs/framework.swc</library>
<library>libs/qtp.swc</library>
<library>libs/rpc.swc</library>
<library>libs/utilities.swc</library>
<library>libs/player/playerglobal.swc</library>
</include-libraries>
5.1.4. Compile the application for testing:
5.1.4.1. Open the Flex command window at Start > Programs
> Adobe > Adobe Flex 3 SDK Command Prompt (Plug-in Version)
5.1.5. Run the build batch file, for example C:\Program
Files\Adobe\Flex Builder 3
Plug-in\sdks\3.0.0\samples\explorer\build.bat
5.2. Build RunTimeLoading wrapper (without including
automation libraries)
You can bypass this recompilation overhead by just using the
runtimeloading feature. This is an automation-compiled template
which loads production swf’s and makes them automation ready.
You can find the files at “C:\Program Files\Adobe\Flex
Builder 3
Plug-in\sdks\3.0.0\templates\automation-runtimeloading-files”.
All you have to do is copy the following 3 files into your
explorer app swf directory (or bin directory), host this on some
webserver and access runtimeloading html in this fashion:
1. RunTimeLoading.html
2. runtimeloading.mxml
3. runtimeloading.swf
http://localhost:8080/domain/RunTimeLoading.html?automationswfurl=explorer.swfIn this way, you don’t need to compile your application
with automation libraries, so you ship exactly what you build
(which turned out to be the only solution that satisfied my boss).
6. Reference
6.1. Flex Install info
6.2. Creating Applications for Testing
7. Troubleshooting:
This was only necessary for me in Beta 1 but if you have
troubles in Beta 2, you might try adding the following:
7.1. Add the following compiler option (project properties
> Flex Compiler) and recompile and record:
-include-libraries libs/automation.swc
libs/automation_agent.swc libs/automation_dmv.swc
libs/datavisualization.swc libs/flex.swc libs/framework.swc
libs/qtp.swc libs/rpc.swc libs/utilities.swc
libs/player/playerglobal.swc -locale en_US