Here is what you need to get started:
1. A Web Server
You will need to install and configure a web server or make sure you have access to one where you can upload your .html and .swf files. This is the server that you will direct your test scripts to as well.
We won't go into details here – the most obvious choice, if you don't already have access to one, is to install Apache.
However, if you prefer to run all your tests locally, you will need to change your Flash Player settings to allow local Flash content to connect to the internet. Here's how you do that:
This link will bring up your Flash Player Settings Manager.. Go to the “Global Security Settings”, go to “Edit Locations” and add the local .swf file that you want to test.
2. Flash Builder or another IDE of your choice
There are several ways (depending on the tools you plan to use as well) to setup your automation environment. All of them, though, require compilation of a Flex project, so you will need an environment that allows you to do that. At first, you can download the Flash Builder and use the 60 day trial. Note that if you plan to use Adobe's Automation Framework you will only be allowed to use 30 actions/test script, unless you have a FlexBuilder Pro Licence. The Framework for Flex 2 used to be available within the LiveCycle Data Services package, for which, as far as we know, you can get a free Licence by registering on the site if you only need it for development purposes. But since Flex 3, the Framework is no longer provided in LCDS.
Depending on the preferred approach and the chosen automation tools, there are several ways to start your flex/flash automation.
Let's say you want to test a Test.swf application.
Option 1 – Using Adobe's Automation Framework and an Automation tool of your choice
To automatically test your Test.swf application, you need to either have the source code for it and recompile it (probably the best approach) or load your automation libraries at run time.
Here are the instructions for both cases:
Option 1a – Recompiling Test.swf with automation support
Once you have the source code for your Test.swf, you need to recompile the Flex Project after including your automation libraries by using the include-libraries compiler option (in Flash Builder, you just have to go to Project > Properties > Flex Compiler and add them to the “Additional Compiler arguments” field).
You will have to include:
automation.swc
automation_agent.swc
automation_charts.swc (only if your application uses charts)
automation_dmv.swc (for charts or the AdvancedDataGrid classes)
1 | <?xml version="1.0" encoding="utf-8"?> |
Note: In the above option the name of the test application is hard-coded inside the wrapper, but there is also the option to pass the name of the application as a parameter.
For example, we have a FunFXLoader (compiled with all the required automation libraries) that we use anytime we want to test a Flex application using FunFX.
The .mxml looks like this:
1 | <?xml version="1.0" encoding="utf-8"?> |
1 | <mx:Script source="YourFramework.as"/> |






