Copy link to clipboard
Copied
Is it possible to run FlexUnitTests on a Flash Professional Project? (created within Flash Builder)
I notice when I create a FlexUnitTest in my Flash Professional Project FlexUnitApplication.as and FlexUnitCompilerApplication.as get created, however nothing is generated in the bin-debug folder, meaning that when I try to run tests, I get the error: "File not found: file:/blabla/bin-debug/FlexUnitApplication.html"
Seems to work fine in Actionscript projects, I tried moving "FlexUnitApplication.html" over from the bin-debug of an Actionscript project, that didn't help!
Copy link to clipboard
Copied
While I haven't tried it with Burrito, with previous versions the answer is no and I'm assuming with Burrito it will be the same.
In general, a FlexUnit project when compiled against a Flex or ActionScript project needs to perform several tasks on the project it will be testing. The resulting SWF is a application that has wrapped your project to gain access to the classes to be tested. There are obviously more efficient ways of doing this, if you look at the resulting code, but that is what Flash Builder currently does.
If you think about what a Flash Professional Project is in Flash Builder, and how it works you will realize fairly quickly that Flash Builder does not compile the FLA, it launches Flash CS to do that work for it. Knowing how Flash Builder compiles Flex Unit tests against Flex and AS projects, you realize that at this time it is not possible because Flash Builder would need to know how to modify and compile the FLA. There are several ways the developers of Flash Builder could accomplish using Flex Unit on a Flash Pro Project, however it most likely is not a priority and the ability to create Unit tests in a Flash Pro project should be disabled until it is supported. It is misleading, hence your question.
If you still want to use Flex Unit to execute unit tests against your FLA, there are ways of accomplishing this in the Flash IDE although it is a manual process. If you are writing unit tests for Flash Pro, I'm sure you'll have no problem with it. I can send you some information on it if you are interested in pursuing this route.
Copy link to clipboard
Copied
I would be interested in seeing more about getting Flex Unit to work with Flash Professional Project.
Copy link to clipboard
Copied
Thanks for your helpful reply Ben. I decided that the work involved in executing the Unit tests manually may(well, you didn't describe the process so i am assuming it's a bit of work) be greater than the work involved in changing my project to an ActionScript only project, so in the end I converted my project over.
Copy link to clipboard
Copied
Hi benschmidtke​
"If you are writing unit tests for Flash Pro, I'm sure you'll have no problem with it. I can send you some information on it if you are interested in pursuing this route."
I know this post is old, but will you be able share some methods/information on unit testing flash professional project?
Regards
Pradeep N