Search code examples
apache-flexeclipseunit-testingbuild-automationcairngorm

How can I unit test Flex applications from within the IDE or a build script?


I'm currently working on an application with a frontend written in Adobe Flex 3. I'm aware of FlexUnit but what I'd really like is a unit test runner for Ant/NAnt and a runner that integrates with the Flex Builder IDE (AKA Eclipse). Does one exist?

Also, are there any other resources on how to do Flex development "the right way" besides the Cairngorm microarchitecture example?


Solution

  • The dpUint testing framework has a test runner built with AIR which can be integrated with a build script.

    There is also my FlexUnit automation kit which does more or less the same for FlexUnit. It has an Ant macro that makes it possible to run the tests as a part of an Ant script, for example:

    <target name="run-tests" depends="compile-tests">
      <flexunit swf="${build.home}/tests.swf" failonerror="true"/>
    </target>