I really like the fact that FlexUnit is built right into Flash Builder since one of the main reasons unit testing used to fall off our radars was it was a pain setting up Flex Unit and executing scripts. However one of the things that struck me pretty weird was that Flash Builder was writing tests in the source directory. Best practices in unit testing say that the tests should be in a separate folder called tests/ which should be a sibling of the src/ folder. This lets the tests be written with the same package as the code being tested. This allows, for example, testing functions with a package level visibility.
The correct way to get this working is, when starting the project add another folder called tests for the build path. Now Flash Builder will look at both the source and the tests path when looking for .as files. To write a unit test Test Case, right click on the tests folder and click on the new Test Case option.

[Update] I have filed a bug in Adobe’s ticketing system to track this issue. Please vote for it if you agree: http://bugs.adobe.com/jira/browse/FXU-50
Software Engineer at Comcast Innovation Labs, Creative Technologist, Open Source enthusiast, amateur illustrator, manager Philly Android Alliance User Group. The content on this blog do not reflect the views of my employer.