FlexUnit for Ant Update#4

You can download a new release of FlexUnit for Ant. This version fixes a bug with the toDir property and also removes the need to create a configuration file under the FlashPlayerTrust folder to allow the SWF to run in the local trusted sandbox. The Ant task will now send a policy file to the Flash Player to allow the data to be sent over the socket – should make life a little easier.

For more details on how to use FlexUnit for Ant please see my earlier blog. There is also documentation on the flexunit Ant task parameters at the end of this blog. You can download FlexUnit from Adobe Labs.


Binary distribution


Source Distribution


Example Project


Ant Task Parameters

swf The name of SWF containing the tests to execute. Yes
port The port to receive the test results on from FlexUnit. The default port is 1024. No
timeout The time in milliseconds to wait for results from FlexUnit before stopping the building process. The default is 60 seconds. You need to allow enought time for your tests to run as the socket is opended prior to the test execution. No
toDir The output directory for the test resutlts. The default is the working directory. No
haltonfailure Stop the build process if a test fails. The default is true. No
failureproperty The name of the property to set in the event of a failure. The default is ‘flexunit.failed”. No
verbose Causes the flexunit tasks to print status messages. The default is false. No

3 Responses to FlexUnit for Ant Update#4

  1. David Chang says:

    Hi, thanks for sharing this example. Just wanted to note a little change to get it working on a mac…In FlexUnitLauncher.java, add another OS check (os.name system property compared to “Mac OS X”). For the command use “open ” assuming swf’s are associated to the flash 9 standalone on the system.

  2. Kevin Fitzpatrick says:

    It looks like the source on the Adobe Labs site is completely different. Has this tool set been completely updated?

  3. Werbeagentur says:

    Many thanks from Germany for it! Great article.Werbeagentur