Running FlexUnit with Starling
Hello,
I have issue with running FlexUnit build when developing with Starling.
I have created build for Flash desktop application (not pure ActionScript) and I created FlexUnit run configuration and I am referencing my this build, and it is working as expected for all tests. But problem is when I want to test something that uses Starling. Since Starling requires renderMode to be set to direct in descriptor, and FlexUnit descriptor is built each time, I cannot change this value (because on each run it re-creates default one), so I'm getting standard Starling AIR output "This application is not correctly embedded (wrong wmode value)". I have my custom descriptor for running application, but FlexUnit doesn't use that one but creates its own.
So I'm interested in how can I work around this issue (maybe disengage automatic creation of FlexUnit descriptor?).
Kind regards,
Vjeko
Please sign in to leave a comment.
I'm afraid there's no easy way to achieve it using current release of IntelliJ IDEA. The only way is to write your own test runner, configure a separate build configuration with your custom test runner as a main class and custom AIR descriptor, and launch it a a usual AIR app (i.e. not as FlexUnit run configuration).
Please create a request to support your use case: http://youtrack.jetbrains.net/
Thank you.
I have found the way to work around this issue. To be able to run this, you need to modify generated descriptor file, but after it has been generated (meaning before you run it). So in my run settings, I have checked Make and Ant. Make will perform before Ant is executed, so this way we can change newly generated descriptor file.
For Ant script I have just used insert functionality from xmltask. I have inserted <renderMode>direct</renderMode> after content in initialWindow. Also, generated descriptor file uses namespace, so be sure that your path is with : symbol (insert tag description).
Hope it helps.
Regards,
Vjeko
Ok, but still don't forget to open YouTrack request. Out-of-the-box support will be more convenient for you and for other users.