Each method in the original class will produce a test method as well. Each package in the project will generate a test suite containing all the tests defined for each class in the package. Similarly a project test suite will be generated containing all tests suites and a project test runner will be created.
The source folder for the tests can be selected in the Enterprise IDE preference page. By default the unit tests will be created in the project main source folder if a test source folder is not specified in the preference page.
Note: If a class has an existing test class associated to it a new test class is not generated for it. The tests suites however are always recreated to accommodate all tests, pre-existing and new. The tests methods generated are stubs, they will have to be filled with the actual testing code.
Note: Consider using the Flex Metrics Explorer CCN (Cyclomatic complexity) number to decide how many tests are needed for a particular class method.
To generate a FlexUnit test for a single class, use the class context menu on the Flex Package Explorer or Cairngorm Explorer and choose Generate FlexUnit Test, or alternatively right click on the class AS file on the Flex Navigator and choose Enterprise Flex > Generate FlexUnit Test for AS Class.
Note: The Flex project needs to have the flexunit.swc library on the build path for the tests to be generated properly.




