views:

863

answers:

7

Are there any unit testing solutions for Flex? or actionscript 3?

If so, what are their features? Any UI testing abilities? Functional testing? Any pointers, examples, libraries or tools that you can share?

+6  A: 

FlexUnit is pretty awesome - http://code.google.com/p/as3flexunitlib/

Also ASUnit - http://code.google.com/p/as3flexunitlib/

They are both pretty similiar and both haven taken quite a bit from frameworks like JUnit.

FlexMonkey (http://code.google.com/p/flexmonkey/) although I haven't used it myself seems to do UI unit testing.

Max Stewart
FYI: FlexUnit has been moved to http://opensource.adobe.com/wiki/display/flexunit/FlexUnit
Andy May
And the link to AsUnit should be: http://asunit.org
Luke Bayes
+3  A: 

I can confirm that FlexMonkey indeed does UI unit testing. It provides record/playback of UI interactions and generates FlexUnit test cases.

Check it out at http://flexmonkey.googlecode.com

+2  A: 

I would recommend FlexUnit, too... and you also have a look at Visual FlexUnit.
A few days before I found the RIATest-Tool, but I haven't tried it yet.

Jochen Hilgers
A: 

For asynchronous unit testing dpUint is pretty useful. However FlexUnit is the way to go, if you wish to integrate unit testing with a Maven build. Asynchronous testing (e.g. Cairngorm events) can also be done with FlexUnit, but is not as elegant as with dpUint.

Yaba
+2  A: 

I just found fluint, and it was a great unit testing library, better than both Flexunit and ASUnit imho. It handles asynchronous testing really nice.

ciscoheat
+1  A: 

I'd recommend fluint simply due to it having a more active developer base (and it's improved support of testing asynchronous code). Also, if you are after mocking/stubs there is asmock (a dynamic mocking framework) and mock-as3 (a static mocking framework).

Richard Szalay
A: 

Try mockito for flex http://bitbucket.org/loomis/mockito-flex