FlexUnit4 tests broke in FB4 beta 2

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-24C6AB4D6 AA7.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!

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.

Similar Messages

  • Unit tests with ant (FB4 beta)?

    Since flexunit is integrated with FB4, I was wondering how to run unit tests with ant on FB4 (using 3.4 sdk). In my current ant build file, the <mxmlc> and <compc> tags both work but the tag <flexunit> does not seem to work anymore (it worked on FB3 with flexunit download). So is there anyway currently to run unit tests on FB4 using ant?

    Hi,
    Let us take your requirements as separate two requriements.
    1. Using the flexunit ant task - I think for this you needed a separate ant library to support this. So this may be missing in the ant available with FB. May be you can analyse this and add on your own and try out.
    2. Debuggin the results.
    Now FlexBuilder has the feature inbuilt as part of the IDE which provides more featuers like , source naviagation, rerunnig , saving results loading results etc.FlexBuilder uses its own set up to show the results details in IDE.
    Currently other than using the feature in FB, there is no way to debug the results of the tests. However if you would like to get the tests to be run by ant task, and analyse the results, the following can be used.
    Option 1 : Run outside FB, show and analyse results in FB
    a. Use the FB, create some sample testCases in FB.
    b. Use 'Execute FlexUnit tests' from the run,  or debug launcher
    c. Use the option Save configuration. This will get the configuration as xml or mxml file. You can use this file template and generate your test cases (may be you will configure your tests in a testSuite class and always use that as the input to the application, so that application syntax never changes). If you run the mxml created swf  (whch you can do by the simple ant tasks which does not use the flexunit task ) out side FlexBuilder and if the FlexBuilder is open, you can still see the results in the FB and analyse the results. (You need the library which is used by the FB to use the classes. You can get the location of swc file by inspecting the library path of a project in which you have added the testCase or testSuite class using the FB IDE)
    Option2:Run outside FB and  Analyse the results in FB.
    If you have the project for which you have run the tests, and you have the XML results of the run, you can still analyse the results in the FlexBuilder.
    a. Ensure that the report is in the required syntax of FB. (we have tried to use the similar syntax as that of the JUnit resutl report)
    b. Use FB, load your project, open the FlexUnit result view, use the open result option in the FB. This should load the XML in FB (we have only ensured to open the result files which were created using FB ,back in the result view. So if you are facing some issue in opening your XML, you can refer the required syntax by saving a sample run result from FB)
    Option 3: Run and analyse the results in FB.
    a. Have the input setup mentioned to FB. (If you would like to integrate changes, have a suite class which will take care of this and mention in the Execute FlexUnit tests to use this suite class. But there is no way to specify to run the FB commands outside FB.)
    b. So whenever you would like to anlyse the tests, you need to run your test in FB and then analyse the results shown in result view.
    Please let me know whether this is what you are looking for.
    Thanks,
    Rani

  • Running FlexUnit4 tests via ant & Hudson?

    I'm just starting to move towards test driven development and I'm trying to figure out how to get continuous integration with FlexUnit4 working for our Flex projects & Hudson.
    I've got our project compiling in Hudson via ant but I'm not sure how to go about having ant/Hudson run the FlexUnit4 tests? Is there an ant task I'm supposed to use or something somewhere?
    Is there any documentation I should be reading? Forum/blog posts? I see a bunch of stuff about opening sockets and whatnot but I'm not sure if that's how it's supposed to work.
    Thanks for any pointers.

    Hi Brian,
    I downloaded the latest build and tried running the ant task in the CISample project on my dev box just to see if I could get it to work locally first. I got a big stack trace running this with flex 3.3 but it apeared to work better with flex 3.4. However the build failed running the "test" ant task. This was my output:
    init:
    compile:
        [mxmlc] Loading configuration file /opt/flex_sdk/3.4.0/frameworks/flex-config.xml
        [mxmlc] /home/jersinghaus/fu4/4.x/FlexUnit4SampleCIProject/bin/Main.swf (327000 bytes)
    test:
        [mxmlc] Loading configuration file /opt/flex_sdk/3.4.0/frameworks/flex-config.xml
        [mxmlc] /home/jersinghaus/fu4/4.x/FlexUnit4SampleCIProject/bin/TestRunner.swf (846287 bytes)
    [flexunit] Creating local trusted file
    [flexunit] opened server socket
    BUILD FAILED
    Error launching the test runner.
    So I thought I'd ask a few questions:
    1. Is there a log file somewhere that might give me some more detail as to the error?
    2. I'm familiar with fluint's test runner which is an air application which runs test suites inside modules compiled to swf's. (I'm sure you know all this ) But here it looks like you call flex with no air related calls.  Does CISample project and associated ant build script work for air applications?
    Thanks,
    Joe

  • FB4 Beta 2 error message on "validate configuration" for web root

    Hello:
    I have been working in FB4 beta 1 and had a php project working fine. After installing FB4 beta 2, i am now having problems with the flex server web root and/or root URL. i am now getting the following error message when I try and "validate configuration" for a configuration which had been working. The error message is:
    "(the web root) is not a valid location because the project contains a linked resource at that location"
    Here are my settings which had been workin g with FB4beta1, but which now result in the error message with FB4beta2:
    >> web root c:\wamp\www
    >> root URL: http://localhost
    >> output folder: c:\wamp\www\projectname-debug
    I am running wamp server on my local machine as my testing server; I run windows XP pro; this is a php project
    Has anyone seen this problem in FB4 beta2?
    thanks very much

    I just recently had this issue myself but I did a Clean on my project and it seems to working fine now.
    Hope this helps if you are still having this issue.
    Keith

  • SetStyle method deprecated in FB4 beta 2?

    Hi,
    I've recently (been forced to..) move from fb4 beta 1 to beta 2.
    The project I've been working on no longer compiles in beta 2 it seems.  The error is that the setStyle method is undefined on the INavigatorContent interface.  This worked fine with beta 1.
    Basically, I'm extending a ViewStack and want to set a style on the selectedChild. Kinda like so:  this.selectedChild.setStyle("hideEffect", hideEffect);
    How can this be worked around?  Do I need to cast specifically to the underlying objects or something?
    Thanks
    Marty

    What changed is that selectedChild is now an INavigatorContent.  It used to be Container.  If you know that all your viewstack children have setStyle methods, find a common class or interface and cast to it.  Probably
         UIComponent(this.selectedChild).setStyle("hideEffect", hideEffect);
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • FlexUnit4 - Tests run but runner has to be manually closed and no reports generated.

    I am trying out FlexUnit4 and using ant to build the tests.
    I built my ant script on the one from the FlexUnit4SampleCIProject.
    The test from that project run, the runner automatically closes and the reports are generated, my project however does not close the runner and generate reports.
    I am using flexsdk 3.3
    What could i be doing wrong?

    Morning guys,
    Mike and I worked through the race condition issue this evening/morning and new code should be in SVN as you read this post.  The short of it was that sometimes the FlashPlayer would spin up faster than the socket on the Java side and data was being lost along the way.  We've implemented a handshake between the CIListener and the Ant task so we can guarantee that things are working correctly now.  I've also done a shallow refactoring of the code to decouple some responsibilities so we can more easily test things going forward.  I've also updated the threading code to use stuff from Java 5, so going back to Java 1.4 will be a pain, but is still feasible with a few extra JARs.
    Let us know how it goes.
    -Brian

  • Beta Tester to Volume Licensing (Beta tester Adobe CS3)

    The last time I rememeber, I had to reinstall the beta. The volume install WILL NOT INSTALL OVER THE BETA.
    Are there any peeps that know how to do this correctly?
    Or links on how to do?
    Also a tester for Tascam, Sony and more.
    Thanks!

    Opps, didn't know I started a thread on this, anyway, there is a new thread, I have tried everything.
    30 Day Demo=crash
    New HD, still crash.
    Used Adobes script cleaner, still crashes.
    Use the utilities (ADOBE), reinstall, still crashes!

  • FB4 beta 2 will expire in 7 days...

    Hi,
    I'm a little bit worried; my Flex Builder 4 Beta 2 will expire in 7 days... Is there any news on a new beta release ? Can I request a 'new' serial somewhere? Or did I miss the Beta 3? I've bought version 3 just to be able to use version 4 And going back is not an option. It just works fine for what I do and I'd love to be able to use it a little longer or to upgrade to the release version.
    Ronaldo

    Ow, please accept my sincere apologies.
    After writing the post, and drinking some more coffee I realized I was only running the 30 day trial version somehow, which would expire in 7 days.
    I went to the https://freeriatools.adobe.com/flashbuilder4beta/ and entered my FB3 serial, and within a minute I received a serial for FB4 that works.
    Sorry for the mistake!
    Ronaldo
    (PS: I'm curious though when this one will expire)

  • FB4 beta 2 installation issues

    Hi,
    I am trying to install flashbuilder4_b2_win_100509.exe, and i keep getting 'Please select another location to extract the installer to' error. See the attached file. If i choose a different location is still get the same error dialog.
    I noticed that the installer temporarily extracts the files under C:\Documents and Settings\<user>\Local Settings\Temp\<I1257369022>. This has two directories InstallerData and Windows. I tried selecting FB4_Standalone.exe under the Windows directory, but that didnt help much.
    I read there could be some issues with java updates, not sure how true that is, i have Java 6 undate 11 installed.
    Any suggestions what i can do here? I have un-installed my previous flash builder 3 and 4 beta 1 versions, cleaned up registry files etc.
    Thanks,
    John

    Hi,
    I've seen this error happen occasionally if the temp folder gets too full, even if there's plenty of free disk space. I've been able to resolve it in the past by deleting old files from the tmp folder, and then emptying the recycle bin.
    Let us know whether or not this helps,
    -Chris

  • Design mode could not load ... It may be incompatible...:FB4 Beta 2 and Flex SDK 4.1

    Hello,
    ever since I upgraded to the latest nightly builds about two weeks ago (SDK 4.1) I get the error mentioned above, and the design mode of Flash Builder 4 Beta 2 doesn't work any more:
    Design mode could not load he.enwipe.core.swc. It may be incompatible with this SDK, or invalid. (DesignAssetLoader.CompleteTimeout)
    Design mode could not load PureMVC_AS3_MultiCore_1_0_5.swc. It may be incompatible with this SDK, or invalid. (DesignAssetLoader.CompleteTimeout)
    and also all other "swc" inside my project that do not come directly from the SDK or Flash Builder.
    Any ideas what could be the cause?

    Hi,
    Did you switch your projects build option to merge into code rather than have runtime libraries generated.
    David.
    [edit'] I really should sleep a bit more- I miss read the question, but you will probably need to break down your project to see what the issue is mxml by mxml, one thing is that any mxml headers need to halo name space renamed to mx.
    as below -
    xmlns:mx="library://ns.adobe.com/flex/mx"

  • Configure J2EE Server in FB4 beta

    Hi,
    I think, there are very serious problems with J2EE deployment in FB4 beta2.
    1) Can not change or add or delete anything in "Target Runtime".
    New button and "Show all runtimes" checkbox don't do anything.   "New" button gets disabled and no way to re-enable it.
    Can't unistall Facets either.
    Imported my Flex project from FB3.  It produced error: "Target Runtime JBoss 5.0 not defined".
    So I am going to project Properties/Target Runtime to remove old one and add a "new" JBoss 5.0.
    Nothing works (see #1).
    2) OK, trying to create a new Flex project, going through Create Flex project wizard.
    On page "Configure J2EE Server" it is expecting Server location with existing WEB-INF/flex folder containing flex-config.xml or services-config.xml
    But from where, some other existing project ?
    Plus, JBoss5 forces you to work with non-exploded archives (WAR, JAR, etc)
    How do you resolve that one ?
    Am I missing something ?   Or is FB4 beta2 is completely unusable with JBoss 5.1 ?
    Is there beta3 or nightly build where it is fixed ?
    Please help !
    TIA,
    Oleg.

    Still no solution to that problem ?
    Say, I am developing an AIR2 app which has some Java part to it (remoting, Web Service, whatever),
    with or without BlazeDS (or LCDS). Anything requiring Web Server (J2EE / servlet container).
    How do I add new Server to FB4 beta2 ?  Lets say Tomcat 6 or JBoss 5.1.
    If I go to Preferences->Server->Runtime Environments, there is only one selection - J2EE  Runtime Library (what is that?)
    OK, I click Add, then link Download additional server adapters, and in a few seconds prompts for login/pwd for SAP Community Network.
    I don't know any... so after I click Cancel, I can only choose Geronimo, GlassFish, Jetty, Weblogic, WASCE.
    No Tomcat, No JBoss ?   Nothing like a long selection list in FB3 ?
    Search for server runtime environments stops right away.   FB3 can find a dosen ones on my hard disk.
    Is it a major hole in FB4 beta2 ?
    Makes it pretty useless to me...  :-(
    Please advise !
    Thanks,
    Oleg.
    Message was edited by: olegkon
    Message was edited by: olegkon

  • FB4 Beta 2: Stopped working today. Is that intentional?

    Hello,
    I have 47 days left on my beta2.
    It worked yesterday, but not today.
    Is that intentional?

    No worries. Just a fluke. FB4 beta2 was just blank and forgot that it was a program. It is working now.

  • FB4 Beta 2: Variables accessed across swf-files are null.

    I’ve been working on an ActionScript project and just recently switched from FB4 Beta1 to Beta2. The project is made up of multiple swf-files that are loaded into shell.swf. When compiled with FB4 Beta1 variables are accessible across the loaded swfs and shell.swf but they just turn up as being null when compiled with FB4 Beta2. What causes this behavior and how do I go about it?

    If you are using Marshall Plan functionality, it is no longer available by default.  You have to add the MXMLC option
    -includes=mx.managers.systemClasses.MarshallingSupport
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • SMP 2.3.3 Hybrid Web container testing with iOS 8 beta

    Hi Experts,
    Our HWC container version is 2.3.3.6966 and our SMP version is 2.3.3
    Any help will be much appreciated.
    Thanks and Regards,
    Sreeni Jayapal.
    Message was edited by: jitendra kansal

    In SAP support portal, we can only see up to SMP 2.3 SP04PL01, from where we can download this patch?
    Is this patch (SMP 2.3 SP04PL02) solve the HWC application compatibility issue with iOS8?
    Thanks
    Fibeesh

  • Upgrade FB 4 Beta Projects to FB4 Premium

    Hi there,
    I just upgraded from FB beta 2 to FB4 Premium.  I'm using the Eclipse plugin.  When I installed FB4 Premium I just installed it into the Eclipse installation in which I had FB Beta 2 thinking FB4 Prem would over-write it.
    Well, it did over write it but now my projects that were using FB4 Beta 2 now do not recognize the "mx" Halo namespace.  The namespace I'm using is 'xmlns:mx="library://ns.adobe.com/flex/halo'.  So, the projects will not build and I can't seem to track down where in my project properties I need to make changes.
    Any ideas or suggestions on how to resolve this?
    Thanks,
    Tami

    Found the answer here.
    The namespace I cited was changed to "library://ns.adobe.com/flex/mx"
    Tami

Maybe you are looking for