Unit testing in flex
-
02-07-2019 - |
Question
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?
Solution
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.
OTHER TIPS
FlexUnit is pretty awesome - http://opensource.adobe.com/wiki/display/flexunit/FlexUnit
Also ASUnit - http://asunit.org
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.
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
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.
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.
Try mockito for flex http://bitbucket.org/loomis/mockito-flex