Skip to main content
October 30, 2009
Question

FlexUnit4 tests broke in FB4 beta 2

  • October 30, 2009
  • 1 reply
  • 597 views

We had numerous FlexUnit4 test classes containing many test cases (both "regular" and async) running from Flash Builder 4 beta 1 (created based on http://www.insideria.com/2009/05/flashbuilder4-will-support-fle.html ).  These all stopped running with the release of Flash Builder 4 beta 2 (just a

blank white page displayed (view source reveals the html wrapper for the runner SWF).

I even went so far as to delete the old mxml runner and the previous flexunit SWCs; then created a brand new Test Class and Suite (based on http://help.adobe.com/en_US/Flex/4.0/UsingFlashBuilder/WSA8198309-A6A6-4c68-A65C-24C6AB4D6AA7.html ) to try to get a feel for any changes to running the tests.  However, even running these results in just a blank white page opening in the browser, and no tests running.

I know this is a really open-ended question (sorry!) but I'd like to hear thoughts of resources I could look at, or things to try to get these tests running again.

Thanks!

This topic has been closed for replies.

1 reply

Participating Frequently
October 30, 2009

Well, I can at least tell you that FlexUnit 4 tests work (and actually work quite a bit better actually) in FB4 beta 2. We have been testing on it for quite a bit before it was available and actually ran a lab on this at Max without problems.

I know that doesn't help your issue, but I wanted to give you hope that it is possible.

All of that said, I am actually going to guess it might be a workspace issue. If you read the fine print, there is no guarantee that a workspace or a project created in FB b1 will work in FB b2 and I have had some serious issues.

As a starting point, just create a new workspace and a new project. Then create a single test and make sure you can run it.

After you do that, we at least will have a starting point to test further,

Mike

November 5, 2009

Mike, thanks for your message.

Upon further investigation of this, I had to start up a server and point to "localhost:port" (I'm communicating with a Ruby/Rails server for various files, logic and DB interaction) in order to get the tests to run.

The way I have my project set up is building the SWF directly to a directory in my Rails server for ease of development and test runs (no need to copy the SWF into the server folder).  So, when I build my FlexUnitApplication.swf, it builds to this same directory.  Executing Flex Tests opened the browser, pointing to D:/subdirectory/FlexUnitApplication.html, but the FlexUnitApplication.swf never gets loaded into the html container -- unless the server is running.

I haven't figured out yet why this is required as the unit tests are all written to run independently of a server, and server calls are mocked.

I'm continuing to investigate this.