Running flexunit tests from command line (How?)

I got my flexunit tests running nicely in IntelliJ (13 ultimate). Next logical step - make them run from command line so they could be integrated into CI.

My naive attempt to use command displayed by IntelliJ

adl -profile extendedMobileDevice -screensize NexusOne -XscreenDPI 252 -XversionPlatform AND -extdir ...

did not work (failed to connect to IntelliJ).

Could some one either explain how flexunit tests could be run from command line or (even better) point me to some place where I can read about it.

Your comments/suggestions/explanations would be highly appreciated.


P.S. I am also curiouse what is going on with I see this site referenced from many different places, but it seems it is dead?

Comment actions Permalink

The whole FlexUnit technology was donated from its original authors to Apache. See will be up in few days (probably redirecting to my link)

It is not possible to execute the same test runner from IDE and from command line because IntelliJ IDEA test runner needs special server at IDE side. To run from command line you need to write your own test runner, I think my link should help.

Comment actions Permalink

For future references:

I was able to figure it out.

  1. clone
  2. build it (something like "ant -Dbuild.version=4.10.42 -Dbuild.sdk=4.1 -Dbuild.number=13" in the top folder. make sure that *.swc associated with Flash Player - otherwise unit tests will fail)
  3. add newly build flexunit*.swc and flexunit-aircilistener*.swc to your project
  4. copy build.air.xml from FlexUnit4SampleCIProject and edit it to suite your project layout (dont forget to rename it to build.xml)
  5. ant test

If you are using ANE(s), you will run into problem with mxmlc tag. I have looked into source code for mxmlc Ant Task and it explicitly ignores any file which is not *.swc.  I have forked apache/flex-sdk on github and fixed it so mxmlc accepts *.swc and *.ane. You can clone fixed version at (to build fixed ant task jar, go to modules/antTasks and run ant)

Share and Enjoy.



Please sign in to leave a comment.