BETA2 additions to “FlexUnit support in Flash Builder”!
Adobe’s release of Flash Builder4 ‘s BETA2 has brought in significant changes in the “FlexUnit support in Flash Builder”.
a) The big one being the in-built support to write/run unit tests in the Metadata based approach(FlexUnit 4). For more details check out
Flash Builder now provides wizard support to create and run tests belonging to both FlexUnit1 and FlexUnit4.
On selecting the desired ‘Class to test’ with the ‘Methods to test’, the FlexUnit4 style code gets generated for the test cases.
Similarly there is wizard support and code generation for FlexUnit4 test suites.
Here is the example of the code generated for FlexUnit4 test suite which includes a FlexUnit4 test case class.
b) Flash Builder also provides Hot Key assistance to run flexunit tests.
ALT-SFT-E, F can run tests in the active editor: If the current selection is a test method only that method is run but if the selection is whole class all the tests in the class are run.
ALT-SFT-A,F can run all tests in the active project
c) Flash Builder generates a file called “flexUnitCompilerApplication” which basically contain the entries for all the test suites/cases available within the project.
d) There is new icon for ‘Refresh‘ in the ‘FlexUnit Results’ view which can be used to update the flexUnitCompilerApplication when a new test case class is externally added into project, a test case is renamed, deleted etc.
Here is a list of libraries Flash Builder to provide support for FlexUnit.
flexunit_0.9.swc to support FlexUnit 1 tests, Hamcrest.swc to support Hamcrest tests in FlexUnit4, FlexUnit4_1.0.swc to support FlexUnit 4 style tests, flexunitextended.swc to provide the results in the UI browser and FlexunitTestRunner_rb.swc for localization support.
As always FlexUnit supports library project, flex project, AS project and AIR projects for both 3.4 and 4 SDK’s.
e) Performance is another area where there is a significant improvement since BETA1.
I personally thank each and everyone who has consistently provided feedback and i request others to check this out and share your thoughts 🙂