FlexUnit for Ant now supports Mac OS X

A big thank you to Tom Sugden who has added support for Mac OS X.

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

Attribute
Description
Required
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

5 Responses to FlexUnit for Ant now supports Mac OS X

  1. Maxim Porges says:

    Glad to see OS X support being made official. I actually hacked the source tonight to get this working before I saw this blog post.Maybe I’m missing something, but I downloaded the source distribution from this page (in FlexAntTasks.zip), and couldn’t see any changes in the FlexUnitLauncher.java source file to handle launching from OS X. Was the OS X support added in another area, or is the new source zip file not up to date with the OS X changes?

  2. Peter says:

    Thanks for spotting that. It should be OK now 🙂

  3. victor says:

    Hello Peter, how are you?I’m trying to integrate your plugin with maven.when type mvn test, everything begin well, but when the MavenTestRunner.mxml try to connect to a client i have this error(I’ll put the final part(when the error occurs)):[Flex compiler] C:\DatasulWorkstation\workspace\f15\target\test\f15-test-1.0.swf (127026 bytes)Server and Client sockets initializing…Launching testing server socket on localhost:11000.Successfully created server socket.ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=11000]Running : C:\DatasulWorkstation\workspace\f15\target\test\f15-test-1.0.swfRunning Flash Player…Waiting for client connection on port 11000.Successfully open client socket.NG] Client socket close error.Tests ended.————————————————————————] BUILD ERROR————————————————————————Client socket connection time out.————————————————————————For more information, run Maven with the -e switch————————————————————————I’m thankfull if could help me on that.thankyou very much since now.bye!

  4. Sam says:

    I can’t get this to work on OS X 10.4.11. This is the first time I’ve tried this jar on a Mac though. The source zip doesn’t seem to be updated since in the source it’s trying to use rundll32 or gflashplayer both of which are not OS X compatible ;). If there a chance the src code is out of date?

  5. Neil says:

    Hi Peter. Thanks for the nice ant tasks 🙂 I didn’t see any licensing information in the libs. Would you be able to license it under something that would allow open source projects to use it?Thanks