Testing ActionScript and Flex Applications
IntelliJ IDEA supports the versions 0.9 and 4 of FlexUnit, a unit testing framework for Flex and ActionScript applications and libraries.
For running FlexUnit tests, there is a dedicated run/debug configuration type ( FlexUnit).
The FlexUnit-specific tasks are briefly outlined below. For general instructions, see Testing.
Preparing for writing FlexUnit tests
Download and decompress the archive containing FlexUnit libraries.
(The corresponding archives (
.zip) are available, for example, on the FlexUnit Downloads page. The archive name, normally, starts with
The only file that you'll need is the core FlexUnit library (
.swc). Depending on the FlexUnit version, this file may be called
flexunit-core-flex-4.1.0-beta1.64-sdk188.8.131.5259.swcor something similar.
- Though this isn't really necessary, it might be useful to define the core FlexUnit library as a global or project library. This will let you use this library in many projects or modules. See Configuring Project and Global Libraries.
- Add the core FlexUnit library to dependencies of one or more of the build configurations. See Managing build configurations and their settings and Build Configuration Page for a Flash Module.
- Make one of these build configurations active. This will ensure that the code in your tests is highlighted properly. See Selecting an active build configuration.