Run FlexUnit with Flex4 and Halo theme

Recently we got rid of the Flex3 compatibility mode for Flex4 which was quite tough. We had to add some namespaces to our CSS files and pinned explicitly the halo.swc as theme to migrate step by step to the spark theme. We added

<compiler>
  <!-- ... -->
  <theme>
    <filename>${flexlib}/themes/Halo/halo.swc</filename>
  </theme>
</compiler>

to our custom flex-config.xml to overwrite the theme which is used by our ANT build.xml. So far so good.

As well, we call flexunit through ANT to test our front end application which should also use explicit the halo theme. Unfortunately, flexunit does not support (yet) any flag or configuration to use and overwrite the flex-config.xml from the Flex SDK. At the end of the day with some headache we modified the global Flex SDK config file to pin the halo theme as default theme.

If someone knows a better way to do so, please leave a message.

Update (2010-10-26): The flex configuration supports the global variable flexlib which points to its flex home directory. The halo.swc could now be referred with ${flexlib}/themes/Halo/halo.swc instead of the absolute file path.

Further, an option for flexunit is on the way to set a custom flex configuration file. See here for details.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s