Problem running FlexUnit test in FlashBuilder

Hello,
I am trying to run a FlexUnit Test within FlashBuilder.  I did the following things:
1. Created a new project.
2. Created a new TestCase class.
3. Create a test method annotated by [Test]
4. Run then test by righclicking on the project and selecting runas -->  FlexUnit Tests
The project runs and when I run in debug, I can see the tests get executed by stepping through them.  The problem is after the tests are run, it seems to get hung.
When I go to FlashBuilder, I see the following in the FlexUnit resulots.
It is almost as if it is getting hung.  I have tried recreating the project and going through the process several times with no luck.  Is there a configuration in FlashBuilder than I may have wrong that may be contributing to this?
Thanks,
Shon

Hello,
I am trying to run a FlexUnit Test within FlashBuilder.  I did the following things:
1. Created a new project.
2. Created a new TestCase class.
3. Create a test method annotated by [Test]
4. Run then test by righclicking on the project and selecting runas -->  FlexUnit Tests
The project runs and when I run in debug, I can see the tests get executed by stepping through them.  The problem is after the tests are run, it seems to get hung.
When I go to FlashBuilder, I see the following in the FlexUnit resulots.
It is almost as if it is getting hung.  I have tried recreating the project and going through the process several times with no luck.  Is there a configuration in FlashBuilder than I may have wrong that may be contributing to this?
Thanks,
Shon

Similar Messages

  • Can not run flexunit tests from ant

    Hello,
    I'm trying to script test execution in order to integrate tests in Jenkins. I followed the wiki article here http://docs.flexunit.org/index.php?title=Ant_Task
    The tests run successfully with Flash Builder but not with ant. I'm getting the following error:
    Error
    VerifyError: Error #1014: The class flash.filesystem::FileStream could not be found
    I think that this occurs because I'm using the flashplayer_11 as suggested in the wiki article and flashplayer does not load the airglobal.swc component.
    I noticed that Flash Builder launches the ADL.exe process; whereas flexunit within ant tests launches flashplayer.exe.
    Should I use ADL.exe with flexunit instead of Flash player ? In that case how to use adl argument in flexunnit ? I saw that Richard Lee has committed a fix to make flexunit support ADL arguments, how ?
    Is there a solution to my problem ?
    Thanks in advance.
    Ygor

    Thank you Michael,
    I resolved my problem by adding the the player attribute in the flexunit task as follow:
    <flexunit
               player="air"
                workingDir="${bin.loc}"
                toDir="${report.loc}"
                haltonfailure="false"
                verbose="true"
                localTrusted="true"
                >

  • Running FlexUnit tests from command line

    Sorry if that has been posted before: I searched best I could and nothing came up.
    I am interested in building and running my unit tests from the command line so we can add it to a nightly build process.
    I am *very* new to all this: basically I picked up Adobe Flash Builder 4 a month ago and I have done *everything* inside that IDE: writing code, building, testing, running.
    I looked into at least how to build something from the command line, I found this:
    http://help.adobe.com/en_US/flashbuilder/using/WSbde04e3d3e6474c4-59108b2e1215eb9d5e4-8000 .html
    Can't get past this error:
    Buildfile: /Users/dbanks/build_test.xml
    BUILD FAILED
    Target "FlexUnitApplication" does not exist in the project "null".
    Total time: 0 seconds
    Adobe Flash Builder 4:
    An error has occurred. See the log file
    /Users/dbanks/Documents/Adobe Flash Builder 4/.metadata/.log.
    Plus, even if I got this going, I am just building the swf.  I also want to run it and capture the output in some meaningful way that can be read/evaluated/acted on.
    FWIW, the script/xml I am using to try to build:
    build_test.xml:
    <?xml version="1.0"?>
    <project default="main">
        <target name="main">
            <fb.exportReleaseBuild project="NightclubMogul" />
        </target>
    </project>
    execute_build_test.sh:
    WORKSPACE="$HOME/Documents/AdobeFlashBuilder4"
    # works with either FlashBuilder.app or Eclipse.app
    "/Applications/AdobeFlashBuilder4" \
        --launcher.suppressErrors   \
        -noSplash   \
        -application org.eclipse.ant.core.antRunner   \
        -data "$WORKSPACE"    \
        -file "/Users/dbanks/build_test.xml" FlexUnitApplication
    I am not clear what in here is actually supposed to point to where my project lives: it's off in some directory somewhere.  I see that I am pointing to a workspace (Documents/AdobeFlashBuilder4) but when I poke around in there I don't see anything connecting back to the directories where the code lives.
    Any help would be great: getting the tests to build from command line, then getting them to run.

    C:\>sqlplus @myscript
    That would be the easiest variation
    C:\>sqlplus user/passwd@tns_alias @myscript
    would be an often used variation
    And then there is of course the version with parameter passing:
    C:\>sqlplus user/passwd@tns_alias @myscript param1 ... paramx
    Dunno about MSBuild

  • Problems running JMUnit tests using JME SDK 3.0

    Hi
    I've got a regular installation of JME SDK 3.0 on Windows Vista. In netBeans 6.7.1 I create jme project with hello midlet, create a class with one method and create a test case for it using tools context menu. Then I run my project and on emulated device select TestSuite to run. Unfortunately I get an exception:
    java.lang.SecurityException: MIDlet not constructed by createMIDlet.
            at com.sun.midp.midlet.MIDletStateHandler.newMIDletPeer(), bci=24
            at javax.microedition.midlet.MIDlet.<init>(), bci=9
            at jmunit.framework.cldc10.Assertion.<init>(), bci=1
            at jmunit.framework.cldc10.Test.<init>(), bci=1
            at jmunit.framework.cldc10.TestCase.<init>(), bci=2
            at hello.XTest.<init>(XTest.java:20)
            at java.lang.Class.newInstance(), bci=0
            at jmunit.framework.cldc10.TestSuite.<init>(), bci=58
            at java.lang.Class.newInstance(), bci=0
            at com.sun.midp.main.CldcMIDletLoader.newInstance(), bci=46
            at com.sun.midp.midlet.MIDletStateHandler.createMIDlet(), bci=66
            at com.sun.midp.midlet.MIDletStateHandler.createAndRegisterMIDlet(), bci=17
            at com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=27
            at com.sun.midp.main.AbstractMIDletSuiteLoader.startSuite(), bci=52
            at com.sun.midp.main.CldcMIDletSuiteLoader.startSuite(), bci=8
            at com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite(), bci=161
            at com.sun.midp.main.AppIsolateMIDletSuiteLoader.main(), bci=26When I run the same project using emulator from older JWT 2.5, everything is just fine. I've also tried Eclipse wit MJT plugin and SDK 3.0 fails to execute the test as well while JWT 2.5 works fine.
    Any ideas how to overcome the above exception on SDK 3.0 ??

    Hello Iaryy,
    You won't be able to run TestSuites in most simulators/emulators and real devices (as explained in the JMUnit manual [1]). You could either check the following link [2], that provides a patch and instructions to solve this problem for CLDC 1.1 (CLDC 1.0 have a similar solution), or wait until JMUnit 2.0 (which will be released soon).
    Regards,
    Francisco
    [1] http://hammingweight.com/modules/jmunit/userguide.pdf
    [2] http://sites.google.com/site/franciscobenitezleon/projects/jmunit-revised

  • How to run Flexunit tests for FlexModule

    Hello,
    I have a module for which I have wrriten flexunit testcases.
    In my test case, event is dispatched, but is not able to be listening by the associated command (parsley framework). In the browser, it says Errors: 1
    In FlexUnitApplication,
    testRunner.runWithFlexUnit4Runner(currentRunTestSuite(),
    "moduleName");
    What exactly should be mentioned in project name(2nd argument of above method)?
    Please help in troubleshooting why my test wont be running.
    Thanks,
    Tanu

    I started to use JFXtras' testing framework to test the model, not the UI... Works nicely.
    For testing the GUI, I saw the article [Testing JavaFX UIs: Part 2 of ?|http://java.dzone.com/news/testing-javafx-uis-part-2] (and the previous one), but haven't tried yet.

  • Cannot execute FlexUnit Test in Flash Builder 4.7 - File not found: FlexUnitApplication.swf

    Hello!
    I would like to run FlexUnit Tests from within Flash Builder 4.7 but when I launch "Execute FlexUnit Tests", I get the "Launch failed" message popup with text: File not found: FlexUnitApplication.swf
    Is it possible to fix this?
    I'm using Mac OS 10.9

    Hi Atul_Saini,
    So I checked your link and all seems correct on my computer.
    At the bottom of the link you provided there is "see also" section, about activation / deactivation.
    I did not deactivated my licenses before my window re-install, and if now I go to Flash Builder -> Help , desactivation button is greyed out. Could it be the source of my problem that I used my licenses on two computer and did not deactivated them ?
    If yes, how could I deactivate thoses products ? I searched on my profile but I can't find a way to do it.

  • Unable to establish loopback connection when running junit tests

    Hello,
    I just started using jrockit (jrockit-jdk1.6.0_20-R28.1.0-4.0.1) and I encounter a problem running junit tests.
    I have 2 tests in the same junit suite, both do binding to 127.0.0.1.
    The first test succeeds in the binding. Once it finishes, the second one tries to bind to same address and fails due to IOException, Unable to establish loopback connection (logs below)
    If I run them using sun's hotspot jvm they work fine.
    If I run them separately, i.e, only one test per suite, each works fine.
    It seems that only when switching to jrockit I get the problem.
    Any idea?
    Thanks,
    Edo
    Logs:
    ERROR [Main Thread_1] Failed to start ConnectionFullVirtualServer[server.traffix.com/127.0.0.1:3868]
    [org.jboss.netty.channel.ChannelException: Failed to bind to: server.traffix.com/127.0.0.1:3868 ] thrown
         org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:303)
         com.traffix.openblox.core.transport.ConnectionFullVirtualServer.listen(ConnectionFullVirtualServer.java:60)
         com.traffix.openblox.core.transport.VirtualServerTable.listen(VirtualServerTable.java:143)
         com.traffix.openblox.core.transport.StackImpl.doStart(StackImpl.java:772)
         com.traffix.openblox.core.transport.TransportStack.doStart(TransportStack.java:156)
         com.traffix.openblox.core.transport.StackStateMachineImpl.doStart(StackStateMachineImpl.java:75)
         com.traffix.openblox.core.transport.StackStateMachine$StackStateConfigured.processEvent(StackStateMachine.java:60)
         com.traffix.openblox.core.fsm.StateMachine.processEvent(StateMachine.java:90)
    Caused by: java.io.IOException: Unable to establish loopback connection
         sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:106)
         sun.nio.ch.PipeImpl.<init>(PipeImpl.java:122)
         sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:27)
         java.nio.channels.Pipe.open(Pipe.java:133)
         sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:41)
         sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:26)
         java.nio.channels.Selector.open(Selector.java:209)
         org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink$Boss.<init>(NioServerSocketPipelineSink.java:219)
    Caused by: java.nio.channels.ClosedByInterruptException
         java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:184)
         sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:518)
         java.nio.channels.SocketChannel.open(SocketChannel.java:146)
         sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:78)
         sun.nio.ch.PipeImpl.<init>(PipeImpl.java:122)
         sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:27)
         java.nio.channels.Pipe.open(Pipe.java:133)
         sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:41)[ com.traffix.openblox.core.transport.VirtualServerTable.listen(VirtualServerTable.java:146) ][22/12/2010 11:05:57:511]
    ERROR [Main Thread_1] Failed to start Endpoint Stack(server.traffix.com Configured)
    [org.jboss.netty.channel.ChannelException: Failed to bind to: server.traffix.com/127.0.0.1:3868 ] thrown
         org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:303)
         com.traffix.openblox.core.transport.ConnectionFullVirtualServer.listen(ConnectionFullVirtualServer.java:60)
         com.traffix.openblox.core.transport.VirtualServerTable.listen(VirtualServerTable.java:143)
         com.traffix.openblox.core.transport.StackImpl.doStart(StackImpl.java:772)
         com.traffix.openblox.core.transport.TransportStack.doStart(TransportStack.java:156)
         com.traffix.openblox.core.transport.StackStateMachineImpl.doStart(StackStateMachineImpl.java:75)
         com.traffix.openblox.core.transport.StackStateMachine$StackStateConfigured.processEvent(StackStateMachine.java:60)
         com.traffix.openblox.core.fsm.StateMachine.processEvent(StateMachine.java:90)
    Caused by: java.io.IOException: Unable to establish loopback connection
         sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:106)
         sun.nio.ch.PipeImpl.<init>(PipeImpl.java:122)
         sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:27)
         java.nio.channels.Pipe.open(Pipe.java:133)
         sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:41)
         sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:26)
         java.nio.channels.Selector.open(Selector.java:209)
         org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink$Boss.<init>(NioServerSocketPipelineSink.java:219)
    Caused by: java.nio.channels.ClosedByInterruptException
         java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:184)
         sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:518)
         java.nio.channels.SocketChannel.open(SocketChannel.java:146)
         sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:78)
         sun.nio.ch.PipeImpl.<init>(PipeImpl.java:122)
         sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:27)
         java.nio.channels.Pipe.open(Pipe.java:133)
         sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:41

    Have you tracked down if the phone actually sends the TCP connection to the desktop? I'm feeling that this is a firewall issue that shows itself when the firewall zone changes (public/private/domain).
    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.
    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
    objects and unknown namespaces.

  • Problem in running flexunit testcase

    Hi All,
    I am currently working on a flex application. I have to write testcases using flexunit.
    Im using flexbuilder3 and flexunit4beta2. When i tried samples available in flexbuilder help content, its showing "Null pointer Exception". Its showing
    An internal error occurred during: "Launch FlexUnit Tests".
    java.lang.NullPointerException
    I setup the environment as per the instruction given n d maual.
    I am new to flex and flexunit.
    Anyone pls help me to sort out this issue.
    Thanks in advance.
    Regards,
    Bhuvana

    There aren't any flexunit 4 samples in the eclipse help and there isn't a manual at this time, so, I am not sure where you are getting your info from.
    Without more info, there is no way to help. If you want to post the code for your main file that runs the tests and perhaps a test or two so we can see, we might be able to help, but there isn't enough information here to know what you might have done.
    Also, if you want to post a link to the information you have about setting up your environment, that might help too.
    Mike

  • How to restore previous OS; want to run some test for charging problem

    Our Ipod touch 3rd gen will no longer charge form a wall charger.  It will charge from a computer though. Wall charger and cable Ok; check it with an Ipod touch 4gen brand new. Believe it could be IOS 5. Can we restore previous IOS to run some test?

    Downgrading the iOS is not supported by Apple. Sorry.

  • Spark Classes and Skins not being included when running FlexUnit task via Ant

    I have a series of unit tests that run on a spark component. This spark component has a custom skin defined for it, and that is working beautifully.
    Inside that component is a spark list... By default, after digging into the list code, spark lists should use a default skin called "BorderContainerSkin". When I run the application that uses this component directly (whether compiled via FlashBuilder or via Ant/Hudson), the component itself runs and looks exactly like I would expect. When I run my unit tests in the browser (via Run As Web Application command on my TestRunner), the unit tests all perform as expected.
    However, when I run the FlexUnit tests via Ant (either through windows non-headless, or linux headless), an exception is thrown with the following error:
    Error: Skin for FromToList132.FromToListSkin133.VGroup134.fromList cannot be found.
        at spark.components.supportClasses::SkinnableComponent/attachSkin()[E:\dev\4.x\frameworks\pr ojects\spark\src\spark\components\supportClasses\SkinnableComponent.as:632]
        at spark.components.supportClasses::SkinnableComponent/validateSkinChange()[E:\dev\4.x\frame works\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:405]
        at spark.components.supportClasses::SkinnableComponent/commitProperties()[E:\dev\4.x\framewo rks\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:419]
        at spark.components.supportClasses::ListBase/commitProperties()[E:\dev\4.x\frameworks\projec ts\spark\src\spark\components\supportClasses\ListBase.as:785]
        at spark.components::List/commitProperties()[E:\dev\4.x\frameworks\projects\spark\src\spark\ components\List.as:907]
        at mx.core::UIComponent/validateProperties()[E:\dev\4.x\frameworks\projects\framework\src\mx \core\UIComponent.as:7933]
        at mx.managers::LayoutManager/validateProperties()[E:\dev\4.x\frameworks\projects\framework\ src\mx\managers\LayoutManager.as:572]
        at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.x\frameworks\projects\framewo rk\src\mx\managers\LayoutManager.as:730]
        at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.x\frameworks\projects \framework\src\mx\managers\LayoutManager.as:1072]
    (Note: fromList is the id of the spark list used in the FromToList component.)
    The issue is that the "BorderContainerSkin" class isn't ever getting imported along the way. I did several things that worked to "fix" the problem, but they are all hacky and don't explain the root problem:
    1- If I explicitly import that skin into my test file, then everything works great.
    2- If I add the <includes> directive into my mxmlc task in the Ant file, and again specifically call out that skin class, then again it will work.
    However, how would I know what skins from the spark library are going to get included and which aren't? How would I know that a default skin isn't included or where to find it or even what it is?
    It seems like either I'm missing something in my Ant file or there is a serious bug here with the FlexUnit task. Can anyone shed light on if this is a known issue, any permanent fixes (that don't involve keeping track of a long list of strings of class references), or anything that I might be missing?
    Thank you for any help!

    Guessing the ant tasks aren't forcing the include of the spark skins libraries... which is a little silly. I would assume the compiler would take care of this but it is something we can investigate...
    Not 100% sure as to why, but this is what it sounds like.
    Mike

  • Problems running Flash Builder 4.6 profiler

    Hello,
    I have a problem running Flash Builder profiler. When I click "Profile" it starts my web application, but nothing else happens inside Flash Builder itself - no new data appears in Profiler perspective, Flash Builder itself doesn't show any sign of doing something.
    My mm.cfg contains the next line: "PreloadSwf=C:/flash builder workspace/.metadata/.plugins/com.adobe.flash.profiler/11/ProfilerAgent.swf?host=localhost &port=9999"
    Additional details:
    OS: Windows 7
    Flash Builder version: 4.6
    Tested web browsers: Firefox, IE 8 - the same problem in both of them
    Flash player versions: ActiveX/Plug-in Version:11.7.700.169
    I made sure that ProfilerAgent.swf indeed exists in the location defined in mm.cfg. In addition, I tried to change port 9999 to other ports (both in mm.cfg and in Flash Builder). I also verified that the location of ProfilerAgent.swf appears in trusted locations of Flash Player.
    I would be very grateful if someone could help me to solve this problem.
    Thanks,
    Valeria

    R Grieve wrote:
    This sounds like something has gone wrong during installation. CSAR and CSLIBS references should be set up automatically during installation.
    There should also be no need to import the Flex SDKs as CS Extension Builder 2.0 ships with them included. It won't do any harm though having the CS Flex SDKs imported.
    Can you detail how you installed CS Extension Builder 2.0, please and where you obtained it from?
    Here are the installation instructions I would recommend starting from a clean FlashBuilder 4.6 instance:
    To install Adobe Creative Suite Extension Builder, download the ZIP file and unzip it into a root location (SDKRoot).
    Install Extension Builder in Eclipse with Flash Builder or Flash Builder Standalone:
    In Eclipse, choose Help > Install New Software.
    In the Install dialog, click Add.
    In the Add Site dialog, click Local... to browse to the SDK root folder or enter the URL of the update site.
    Name the site CS SDK and click OK to confirm the changes.
    Select the new CS SDK site in the "Work with" field.
    -- Select all the Adobe Creative Suite Extension Builder components.
    -- Click Next to confirm the selection.
    In the Install Details review dialog, click Next to confirm that you want to install all the components listed.
    Accept the terms of license agreements and click Finish.
    Re-start  Eclipse as recommended.
    I obtained it from Adobe and installed it using the Help > Install software option, but without unzipping it. Maybe that was it.
    Now I've done a clean installation and it works perfect. I did it with administrator permissions, don't know if it has anything to do with it, but I read it somewhere and did so just in case!
    Thanks a lot!

  • Java.lang.NullPointerException running flexunit ant task in 4.1 Beta 2

    Hello,
    After trying to debug this all day, I thought I would ask the community.
    I am trying out the new FU4.1 Beta 2 (3.5) from the downloads page.  We have a working CI system set up with 4.0, and I thought trying out 4.1 beta 2 would simply be a matter of replacing the binaries in my lib folder and re-running the ant script.  Evidently not, or else I am missing something.
    After updating to the 4.1 Beta 2 binaries, if I re-run a sample project in Eclipse, the build fails with a java NullPointerException when the <flexunit> ant task is invoked. We have an involved setup that uses the groovy AntBuilder and other esoteric constructs, so I thought I would create a very simple test script similar to the sample CI project to see if that would work.  Unfortunately, I am still seeing the NPE.  The worst part is that there is absolutely no debug information provided - no message, no traceback.  I even attached the Ant source and debugged it. I could see the NPE being caught, but it contained a null message and null traceback.
    Here is the simplified ant script:
    <project name="tests" basedir=".">
        <target name="test-init" depends="">
            <mkdir dir="${build.dir}"/>
            <mkdir dir="${reports.dir}"/>
            <mkdir dir="${reports.xml}"/>
            <mkdir dir="${reports.html}"/>
            <!-- Setup Flex and FlexUnit ant tasks -->
            <!-- You can set this directly so mxmlc will work correctly, or set
            <taskdef resource="flexUnitTasks.tasks" classpath="${lib}/flexUnitTasks-4.1.0-beta2.18.jar" />
        </target>
        <target name="run-flex-tests" depends="test-init">
          <sequential>
            <!-- Execute TestRunner.swf as FlexUnit tests and publish reports -->
            <flexunit
                swf="${build.dir}/TestRunner.swf"
                toDir="${reports.xml}"
                haltonfailure="false"
                verbose="true"
                localTrusted="true"
                timeout="60000"/>
            <!-- Generate readable JUnit-style reports -->
            <junitreport todir="${reports.xml}">
                <fileset dir="${reports.xml}">
                    <include name="TEST-*.xml" />
                </fileset>
                <report format="frames" todir="${reports.html}" />
            </junitreport>
          </sequential>   
        </target>
    </project>
    The output is:
    Buildfile: C:\EclipseWorkspace\tests\Source\Flex\build_test.xml
    test-init:
    run-flex-tests:
    [flexunit] Validating task attributes ...
    BUILD FAILED
    C:\EclipseWorkspace\tests\Source\Flex\build_test.xml:23: java.lang.NullPointerException
    Total time: 297 milliseconds
    Is there something obvious I am missing?
    Thanks for any help!
    Trevor

    Brian,
    OK, a colleague worked with me (thanks, John!) to debug the problem a little further, and I think we found the fundamental problem.  I wanted to post that info to save you some time...
    Aside: One thing we did have to do was to rebuild the flexUnitTasks.jar to include debug information, since the binary in the 4.1 beta 2 package did not have debug=true.  I'd suggest that we might want to change the build script to build the binaries with debug moving forward.
    Back to the problem.
    The NullPointerException is thrown in TaskConfiguration::validateSharedProperties(), when equals() is invoked. Here is the code snippet:
       //if we can't find the FLEX_HOME and we're using ADL or compilation
       if((flexHome == null || !flexHome.exists()) && (testRunConfiguration.getPlayer().equals("air") || shouldCompile()))
          throw new BuildException("Please specify, or verify the location for, the FLEX_HOME property.  "
                + "It is required when testing with 'air' as the player or when using the 'testSource' element.  "
                + "It should point to the installation directory for a Flex SDK.");
    In my case, I do not have a FLEX_HOME property set in Ant currently.  I'll bet most folks have this set, so the logic would run differently for them. For my case, the (flexHome == null) check is true.  That means that the testRunConfiguration.getPlayer().equals("air")check will occur next, and here is the problem. The "player" member is not set in the testRunConfiguration yet at this point, so testRunConfiguration.getPlayer() returns null. testRunConfiguration.setPlayer() is called in generateDefaults().  But generateDefaults() is not called until after validateSharedProperties() is called.  So, if properties initialization could be improved here and I think this code will run more robustly.
    I can work-around my issue temporarily by just setting a FLEX_HOME property in Ant.  But I hope you will agree that the initialization issue with "player" still should be addressed. Would you like me to open a bug report, or is this thread enough?
    Thanks,
    Trevor

  • Running FlexUnit in Security Application Server environments

    Hi all,
    our flex client is running/provided in a application server context with basic authentification. that mean when the user request our flex client he is running into a authentification dialog box inputs username and password and then after validation our flex clients website would be loaded.
    for complex end2end tests we are using flexunit and integrate doing such tests via continous integration with ant. so we have a scenario that we start would start our application server, after start complete we call ant-flexunit with the flex client given url to run our tests after that we shutdown the hole orchestra.
    the problem we are currently facing is the security authentification flow which we are not simply abe to disable this only for testing.
    so the hole automatically testflow is hanging on this authentification dialog popup where we first have to enter our username/pwd. so is there a way from flexunit to trigger the url request with username/pwd as a kind of params automaticly to the server or something else? or whats best practice testing flex apps using flexunit which are hosted under security restrictions? with JUnit i read its possible the manipulate the http request header injecting username/password into the request...
    thanks
    dan

    I am using Oracle 10g9.0.4 or 10.1.2 ? There are small differences between them, so it could be helpful to know the exact version.
    or it does nothing.For the moment don't use forms with parameter list, to avoid one more possible cause. Did you check sensitivity ? For example, if a form is called with name 'My_Form.fmx', and its name, on disk, is my_form.fmx or MY_FORM.fmx. or anything different, then it won't work.
    On form property page activate console window, to see errors, if any.
    Of course I'm assuming that test form works correctly....

  • Got an eror while running unit tests on jsf.

    Hi
    i checked the latest verison from cvs and also downloaded the latest build of glassfish for linux.
    While trying to run the unt tests, i got the followig error when i ran "test.appserver" under jsf-ri.
    i made sure that the server was runing at the time when i ran the test and have the correct versions of cactus,junit and html-unit.But the test resulted in the folowing error:
    run.cactus.test.appserver:
    deploy:
    [copy] Copying 1 file to /home/kc161609/glassfish/domains/domain1/autodeploy
    run.cactus.test:
    [junit] Running com.sun.faces.application.TestActionListenerImpl
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 9.755 sec
    [junit] Testsuite: com.sun.faces.application.TestActionListenerImpl
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 9.755 sec
    [junit] Testcase: testProcessAction took 5.845 sec
    [junit] Caused an ERROR
    [junit] (java.lang.reflect.ReflectPermission suppressAccessChecks)
    [junit] at com.sun.faces.cactus.TestingUtil.invokePrivateMethod(TestingUtil.java:48)
    [junit] at com.sun.faces.cactus.StoreServletContext.setServletContext(StoreServletContext.java:58)
    [junit] at com.sun.faces.cactus.FacesTestCaseService.setUp(FacesTestCaseService.java:147)
    [junit] at com.sun.faces.cactus.ServletFacesTestCase.setUp(ServletFacesTestCase.java:160)
    [junit] at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
    [junit] at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
    [junit] at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
    [junit] at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:224)
    [junit] at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
    [junit] at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
    [junit] at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:224)
    [junit] at org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
    [junit] at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
    [junit] at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:224)
    [junit] at org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
    [junit] at javax.servlet.http.HttpServlet.service(HttpServlet.java:747)
    [junit] at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
    [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [junit] at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:256)
    [junit] at java.security.AccessController.doPrivileged(Native Method)
    [junit] at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
    [junit] at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:289)
    [junit] at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:172)
    [junit] at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:384)
    [junit] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:273)
    [junit] at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:560)
    [junit] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:530)
    [junit] at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:234)
    [junit] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
    [junit] at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:560)
    [junit] at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:71)
    [junit] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    [junit] at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:560)
    [junit] at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:118)
    [junit] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
    [junit] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:131)
    [junit] at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:560)
    [junit] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:530)
    [junit] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
    [junit] at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:214)
    [junit] at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:569)
    [junit] at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:350)
    [junit] at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:243)
    [junit] at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:248)
    [junit] at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:73)
    [junit] Caused by: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks)
    [junit] at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
    [junit] at java.security.AccessController.checkPermission(AccessController.java:427)
    [junit] at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
    [junit] at java.lang.reflect.AccessibleObject.setAccessible(AccessibleObject.java:107)
    [junit] at com.sun.faces.cactus.TestingUtil.invokePrivateMethod(TestingUtil.java:45)
    [junit] ... 48 more
    BUILD FAILED
    /home/kc161609/javaserverfaces-sources/jsf-ri/build.xml:820: The following error occurred while executing this line:
    /home/kc161609/javaserverfaces-sources/jsf-ri/build-tests.xml:452: The following error occurred while executing this line:
    /home/kc161609/javaserverfaces-sources/jsf-ri/build-tests.xml:338: Test com.sun.faces.application.TestActionListenerImpl failed
    Total time: 2 minutes 27 seconds
    There is some "access denied exception"
    (java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks)
    [junit] java.lang.RuntimeException: java.security.AccessControlException: access denied")
    I think there is no problem with the build or the machine .I'm not sure what that problem is well,so please help me out with this error.
    Thanks
    Srinivas

    Hi,
    You got these errors because runInstaller can not start the GUI. There are 2 solutions, you can choose one:
    1. logout Gnome/Kde, login as oracle user, and run runInstaller again.
    2.open a new root terminal,
    a) run "xhost +" as root.
    b) run "su - oracle" switch to oracle
    c) run "export DISPLAY=:0.0"
    d) then run "./runInstaller" again.
    cheers.
    Ice

  • URGENT!! Error While Running Tutorial Test Page.

    Hi,
    We have been facing an issue while setting up the JDeveloper and running the test page.
    ERROR IS:
    Error Page
    Exception Details.
    oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND-INVALID APPLICATION. Tokens: APPL = fnd; (Could not lookup message because there is no database connection)
    at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1142)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1794)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
    at OA.jspService(OA.jsp:40)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
    at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
    at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
    at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
    at OA.jspService(OA.jsp:45)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
    at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND-INVALID APPLICATION. Tokens: APPL = fnd; (Could not lookup message because there is no database connection)
    at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getAppId(OAWebBeanFactoryImpl.java:3931)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:786)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
    at OA.jspService(OA.jsp:40)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
    at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
    at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
    at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
    at OA.jspService(OA.jsp:45)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
    at java.lang.Thread.run(Thread.java:534)
    oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND-INVALID APPLICATION. Tokens: APPL = fnd; (Could not lookup message because there is no database connection)
    at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getAppId(OAWebBeanFactoryImpl.java:3931)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:786)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
    at OA.jspService(OA.jsp:40)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
    at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
    at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
    at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
    at OA.jspService(OA.jsp:45)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
    at java.lang.Thread.run(Thread.java:534)
    =============================================================
    =============================================================
    The msgs that are coming up in the embedded oc4j log is:
    [Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
    C:\JDEV\jdevbin\jdk1.4.2\bin\javaw.exe -client -classpath C:\JDEV\jdevbin\j2ee\home\oc4j.jar;C:\JDEV\jdevbin\jdev\lib\jdev-oc4j.jar -Xbootclasspath/p:C:\JDEV\jdevbin\jdev\appslibrt\ojdbc14.jar;C:\JDEV\jdevbin\jdev\appslibrt\nls_charset12.zip -DFND_JDBC_STMT_CACHE_SIZE=200 -DCACHENODBINIT=true -DRUN_FROM_JDEV=true -mx256m -Dhttp.proxyHost=proxy.mtn.co.za -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=196.13.231.*|webmail.mtn.co.za|autodiscover.mtn.co.za|10.204.5.2|10.204.5.1|*.thecomputerpeople.co.za|virtual.thecomputerpeople.co.za|oms.thecomputerpeople.co.za|*.rentamobile.co.za|*.rentatomtom.co.za|*.mobilesolutions.co.za|*.yelloworld.co.za|*.yellostg.co.za|*.yellodev.co.za|10.217.200.91|eprowebserver.mtn.co.za|10.217.205.64|*.mtn.com|196.11.240.*|196.13.230.*|*.mtnactive.co.za|*.yellomtn.com|*.yellomtn.co.za|*.mtn.co.za -Xverify:none -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 com.evermind.server.OC4JServer -config C:\JDEV\jdevhome\jdev\system9.0.3.5.1312\oc4j-config\server.xml
    [waiting for the server to complete its initialization...]
    Ready message received from Oc4jNotifier.
    Embedded OC4J startup time: 1484 ms.
    Auto-deploying OA Framework web application deployment descriptor (New server version detected)...
    Oracle9iAS (9.0.3.1.0) Containers for J2EE initialized
    Tutalii: C:\JDEV\jdevbin\jdev\appslibrt\iasjoc.zip archive
    ICX DIAGNOSTIC: FND_TOP = C:\JDEV\jdevhome\jdev\dbc_files\
    ICX DIAGNOSTIC: application_id = 601
    ICX DIAGNOSTIC: responsibility_id = 24742
    ICX DIAGNOSTIC: security_group_id = 0
    ICX DIAGNOSTIC: mEncryptedSessionID = VOJ1vU0LWyvpCvPMgp0CPqNg:S
    ICX DIAGNOSTIC: mSessionID = 1874125765
    ICX DIAGNOSTIC: mTransactionID = 1962477773
    ==========================================================
    ==========================================================
    We have setup the same JDEV patch on 2 machines having the same DBC files and the same application logins as well as the same responsibility keys.
    But it is working fine on one machine and we are able to run the test page as well as any custom page that we are developing.
    but on one machine we are unable to run even the test page.
    Both are also on the same network.
    We are struck as we are unable to do any work.
    Could anyone please suggest any solution to this.
    I have gone through the numerous posts regarding this kind of error, but have not been yet able to resolve.
    Thanks

    As per error message, the problem is with the Database connection.
    Check again if your using wright dbc file, you can check it through connection string given in the dbc file
    and also try connecting the database through sql developer.
    --prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for