|
From: Luke B. <lb...@gm...> - 2007-04-09 18:23:17
|
Hey Robert, Thanks for taking the time to write this up, we should definitely talk more before you get too far. First off, please join the asunit-users list as I have to manually approve emails from non-members and it causes a delay for your message to get out. Second - there are a small handful of tools available to help you build classes, test cases and test suites (The AsUnit MXP, AsUnit XUL Ui<http://www.asunit.org/#getStarted>, and AsProject <http://code.google.com/p/asproject/>). The XUL UI, will let you configure your project however you want, but it has the drawback that it has to be kept in sync with your Flex Builder project manually. The MXP and AsProject tools expect your test cases to be in the same project space as your source classes. This doesn't mean that your test source gets compiled into your deployed application as the dependency checker in the compiler should only find references to test features when compiling the Test Runner, and not when compiling the main application. A single flex 2 project can have many application roots, each of which will spit out a separate SWF file based on what classes are referenced from that root. Please take a look at AsProject <http://code.google.com/p/asproject/> to get some idea as to how we structure applications these days. We're actively building tools that support this project layout and hoping that the community will agree that it makes sense. If you choose to layout a project differently, you will probably not be able to take advantage of these features as they become available. Regarding your question of test suites, you can think of each ActionScript test suite as a Composite <http://c2.com/cgi/wiki?CompositePattern>structure that contains any number of TestCases and other TestSuites. Each of the aforementioned tools will automate construction of test suites so that you can be assured that all of your tests are being executed. The only time I manually interact with these files is when debugging some feature or set of features, otherwise I usually just edit the Test Runner's start call to execute the test case that I'm currently interested in, and then edit it back to running AllTests before I check in. Hope that helps! Please keep the questions coming, I'm certain you're not the only one. Luke Bayes www.asunit.org |