Teamcity and Flexunit 4.1

Hi!
I try run flexunit 4.1 on teamcity.
Server configuration - headless linux/ubuntu 64-bit.
And i cannot successfully run it.
That's ant part
<flexunit swf="${target.dir}/${tests.swf}"
     player="air"
     toDir="${report.loc}"
     haltonfailure="true"
     verbose="true"
     localTrusted="true"
     timeout="300000"
     failureproperty="flexunit.failed"
     headless="true"/>
Log:
test:
[flexunit] Validating task attributes ...
[flexunit] OS: [Linux]
[flexunit] Generating default values ...
[flexunit] Using default working dir [/home/svetlakov/softina]
[flexunit] Using default reporting dir [/home/svetlakov/softina]
[flexunit] Using the following settings for the test run:
[flexunit] FLEX_HOME: [/home/svetlakov/.flexsdk/4.1]
[flexunit] haltonfailure: [true]
[flexunit] headless: [true]
[flexunit] display: [99]
[flexunit] localTrusted: [true]
[flexunit] player: [air]
[flexunit] port: [1024]
[flexunit] swf: [/home/svetlakov/softina/target/tests-runner.swf]
[flexunit] timeout: [300000ms]
[flexunit] toDir: [/home/svetlakov/softina]
[flexunit] Setting up server process ...
[flexunit] Starting server ...
[flexunit] OS: [Linux]
[flexunit] Starting xvnc
[flexunit] Attempting start on :99 ...
[flexunit] Executing 'vncserver' with arguments:
[flexunit] ':99'
[flexunit]
[flexunit] The ' characters around the executable and arguments are
[flexunit] not part of the command.
[flexunit]
[flexunit] Opening server socket on port [1024].
[flexunit] Waiting for client connection ...
[flexunit] xauth:  timeout in locking authority file /home/svetlakov/.Xauthority
[flexunit]
[flexunit] New 'localhost:99 (svetlakov)' desktop is localhost:99
[flexunit]
[flexunit] Starting applications specified in /home/svetlakov/.vnc/xstartup
[flexunit] Log file is /home/svetlakov/.vnc/localhost:99.log
[flexunit]
[flexunit] Setting DISPLAY=:99
[flexunit] Launching player:
[flexunit]
[flexunit] Found AIR version: 2.0
[flexunit] Created application descriptor at [/home/svetlakov/softina/target/flexUnitDescriptor.xml]
[flexunit] Executing '/home/svetlakov/.flexsdk/4.1/bin/adl' with arguments:
[flexunit] '/home/svetlakov/softina/target/flexUnitDescriptor.xml'
[flexunit]
[flexunit] The ' characters around the executable and arguments are
[flexunit] not part of the command.
[flexunit]
[flexunit]
[flexunit] Stopping server ...
[flexunit] End of test data reached, sending acknowledgement to player ...
[flexunit] Closing client connection ...
[flexunit] Closing server on port [1024] ...
And that's last message.
Log of vnc
Xvnc Free Edition 4.1.1                                                                                                                   
Copyright (C) 2002-2005 RealVNC Ltd.                                                                                                      
See http://www.realvnc.com for information on VNC.                                                                                        
Underlying X server release 70000000, The X.Org Foundation                                                                               
Tue Aug 24 15:53:12 2010                                                                                                                  
vncext:      VNC extension running!                                                                                                      
vncext:      Listening for VNC connections on port 5999                                                                                 
vncext:      created VNC server for screen 0                                                                                             
error opening security policy file /etc/X11/xserver/SecurityPolicy                                                                        
Could not init font path element /usr/share/fonts/X11/TTF/, removing from list!                                                          
Could not init font path element /usr/share/fonts/X11/OTF, removing from list!                                                           
Could not init font path element /usr/share/fonts/X11/Type1/, removing from list!                                                        
Could not init font path element /usr/share/fonts/X11/CID/, removing from list!                                                          
Could not init font path element /usr/share/fonts/X11/100dpi/, removing from list!                                                       
Could not init font path element /usr/share/fonts/X11/75dpi/, removing from list!                                                        
X Error of failed request:  BadLength (poly request too large or internal Xlib length error)                                             
  Major opcode of failed request:  134 (VNC-EXTENSION)                                                                                    
  Minor opcode of failed request:  1 ()                                                                                                   
  Serial number of failed request:  68                                                                                                    
  Current serial number in output stream:  68                                                                                             
FreeFontPath: FPE "/usr/share/fonts/X11/misc/" refcount is 2, should be 1; fixing.
Any ideas?

Brian,
Thanks!
Ah... OK, I was thinking the timeout was more like the JUnit ant task timeout when running in forked mode, i.e.the entire test run has that amount of time to complete (see http://ant.apache.org/manual/Tasks/junit.html). I know I was making an assumption there, but it seemed logical to me since the Flexunit test runner is essentially a forked process...
So, you are saying that the timeout in the FU 4.1 ant task specifies the time to wait for a connection from the SWF running in the player?  I see this stated in the Ant task doc on the wiki now - Doh!  You also say that the timeout also applies to each individual test?  So, it sounds like the behavior is similar to the JUnit ant task running in "perTest" forkmode.
Out of curiosity, is there any way to specify an overall timeout for the entire test suite run, by chance?
Anyway, I figured out why adl.exe was hanging.  Evidently an error occurred in the tests which caused a pop-up window to be spawned, and this halted test execution. When I clicked "Dismiss All", the execution continued.  Of course, in a CI environment, there is no one there to click the button to dismiss the pop-up!   So this is kind of a show-stopper. Is there any way to configure the player (Flash or AIR) to suppress pop-ups, or at least not to stop execution when they occur?
Thanks,
Trevor

Similar Messages

  • Can i reference external flex-config in flexunit ant task?

    flexunit gurus,
    i'm trying to figure out how to best specify the compiler arguments for the flexunit ant task in flexunit 4.1 beta 1.  from the documentation i see this sample flexunit usage:
    <flexunit workingDir="${bin.loc}" toDir="${report.loc}"
    haltonfailure="false" verbose="true" localTrusted="true">
    <testSource dir="${main.src.loc}" />
    <testSource dir="${test.src.loc}">
    <include name="**/*Test.as" />
    </testSource>
    <library dir="${lib.loc}" />
    </flexunit>
    in this example, the source and library paths are explicitly listed.  in this simple example all the needed libraries reside within a single directory.
    when i build my application, i use a custom flex-config.xml file, as the following snippet shows:
            <mxmlc file="${application.file}" output="${swf.debug.file}" debug="true" headless-server="${headless.server}">
                <load-config filename="${flex.config.file}" />
            </mxmlc>
    in that custom flex-config.xml file i list all the build options (e.g. source dirs, library paths, theme, etc.) appropriate for building the application.  the libraries i reference are in a number of different directories (in general each 3rd party library is in a different directory).
    in the flexunit task, i could individually reference all the same libraries that are in the flex-config.xml, but that'd be a pain to keep them in sync.  i suppose i also could parse the flex-config.xml to extract the library information and use that to populate the library argument.  really what i want to say in the flexunit task is "build all source and tests as indicated in flex-config.xml, then run the tests", perhaps with a syntax like the following:
    <flexunit workingDir="${bin.loc}"  toDir="${report.loc}"
    haltonfailure="false" verbose="true" localTrusted="true">
                <load-config filename="${flex.config.file}" />
    <testSource dir="${test.src.loc}">
    <include name="**/*Test.as" />
    </testSource>
    <library dir="${flexunit.lib}" />
    </flexunit>
    i'd rather keep the flex-config.xml file free of any test specific information, so ideally i'd specify the path to the flexunit swc's and the test path in the flexunit task (as in the above example).
    is there support for such usage currently or planned for in the future?  recommendations on how best to accomplish my goal of not duplicating library information already present in a custom flex-config.xml?
    thanks.
    -mike

    hi brian,
    thanks for your response.
    i understand the desire to avoid re-implementing the flex sdk ant tasks.  i'm not sure that can reasonably be accomplished wihen the TestRunner is dynamically generated from within the flexunit task.  in addition to the source path and library path, the theme setting and namespaces settings can affect successful compilation, and the runtime-shared-library-path setting can affect whether the produced swf runs correctly.
    perhaps there's an alternative.  what if we separate the creation of the TestRunner.mxml from the compilation and the execution of the tests.  if flexunit offers an ant task that can produce (but not run) a TestRunner.mxml, i can write the mxmlc task that compiles it properly, and then i can invoke the old style flexunit specifying the swf argument.  this would still accomplish my primary goal of not needing to manually enumerate every test file in a TestRunner.mxml that i have to maintain (and which neither Flash Builder nor maven builds require).  to compile the TestRunner.mxml, i'd load in my custom flex-config.xml, then append to the source path and library path to include my test directory and flexunit libraries.
    maybe something like the following to create the TestRunner:
    <generatetestrunner output="${bin.loc}/TestRunner.mxml">
              <testSource dir="${test.dir}">
                 <include name="**/*Test.as" />
              </testSource>
    </generatetestrunner>
    thoughts?
    one other thing i noticed about the current library argument to flexunit is that it assumes a directory even if you provide an explicit path to an swc (i tried switching <library dir...> to <library file...> but that didn't seem to make a difference).  in my case, there are specific swc's i need in the library path, and the task assuming i mean a directory when i specify an explicit swc is problematic.  the directory my swc libraries are contained in sometimes contain multiple and conflicting versions of a library (each library directory contains various snapshot builds of the library).  i need a way to explicitly indicate which library to use.
    finally, could you point me to the java source for the flexunit ant tasks?  i've found the flexunit action script source ok but haven't found where the java ant task is defined.
    thanks.
    -mike

  • 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

  • Flexunit 4.1 beta 1 ant task fails if SDK or project dir contains spaces

    downloaded FlexUnit 4.1 beta 1 for its directory scanning and test loading support.  found a problem - if either the SDK dir (e.g. C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0) or the project dir (e.g. C:\Documents and Settings\flexuser\My Documents\mike\Adobe Flash Builder 4\AntFlexUnit4.1betaSampleCIProject) contain spaces, the flexunit ant task will fail, as the following output indicates:
    <snip>
    [flexunit] '+flexlib'
    [flexunit] 'C:\Program'
    [flexunit] 'Files\Adobe\Adobe'
    [flexunit] 'Flash'
    [flexunit] 'Builder'
    [flexunit] '4\sdks\4.0.0\frameworks'
    [flexunit] '-output'
    [flexunit] 'C:\Documents'
    [flexunit] 'and'
    [flexunit] 'Settings\flexuser\My'
    [flexunit] 'Documents\mike\Adobe'
    [flexunit] 'Flash'
    [flexunit] 'Builder'
    [flexunit] '4\AntFlexUnit4.1betaSampleCIProject\target\bin\TestRunner.swf'
    <snip>
    BUILD FAILED
    C:\Documents and Settings\flexuser\My Documents\mike\Adobe Flash Builder 4\AntFlex
    Unit4.1betaSampleCIProject\build.xml:72: Compilation failed:
    command line: Error: default arguments may not be interspersed with other options
    everything worked fine if i relocated both the SDK and project dir.  unfortunately most of our developers use SDK and project directories with spaces.
    what's the ETA for beta 2 ;-) ?  anxious to integrate this excellent new feature once the spacing problem is resolved.
    thanks.
    -mike

    @mike - Ok I've updated my fork @ http://github.com/blegros/flexunit with the fix.  If you don't want to build from source, you can download the flexunit.zip file from my fork and just pull the Ant task out to use temporarily.  You can find the artifact from my fork's build @ http://flexunit.digitalprimates.net:8080/view/Contributors/job/blegros/lastSuccessfulBuild /artifact/flexunit.zip.
    Let me know if this works out for you.
    -Brian

  • 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

  • FlexUnit 4 alpha 1.0 turnkey project available

    For those of you interested, an alpha 1 build of with the new FlexUnit 4 features is available from the open source download site:
    http://opensource.adobe.com/wiki/display/flexunit/Downloads
    You can find a quick overview of the available features and new syntax here.
    http://opensource.adobe.com/wiki/display/flexunit/FlexUnit+4+alpha+feature+overview
    When you find bugs, please log them in Jira.
    Cheers,
    Mike

    Hi msakrejda,
    I had the same problem initially, I fixed it by using the swcs from FlexUnit 4.0 (i.e. not the beta):
    http://www.flexunit.org/?page_id=14
    From what I could see the turnkey project was only in the beta download so to get this working with the Flex 4 SDK, use the turnkey project from the beta, but in the libs folder, clear out everything except "hamcrest-1.0.2.swc". Then from your 4.0 download, copy "flexunit-4.0.0.swc" and "flexunit-uilistener-4.0.0.swc" in to the libs folder in your turnkey project.
    That worked first time for me (apart from 2 CSS warnings which can be safely ignored).
    Hope that helps.
    Paul.

  • FU4CIListener build.xml not setting properties?

    I am following the Ant Task Setup.  I have flex sdk 3.6.0.X, apache-ant 1.8.2 and the flexunit source 4.1.0.
    When I run > ant -v clean package
    function(){return A.apply(null,[this].concat($A(arguments)))}
    Apache Ant(TM) version 1.8.2 compiled on December 20 2010
    Trying the default build file: build.xml
    Buildfile: C:\projects\FlexUnit4CIListener\build.xml
    Detected Java version: 1.7 in: C:\Program Files\Java\jdk1.7.0\jre
    Detected OS: Windows XP
    parsing buildfile C:\projects\FlexUnit4CIListener\build.xml with URI = file:/C:/projects/FlexUnit4CIListener/build.xml
    Project base dir set to: C:\projects\FlexUnit4CIListener
    parsing buildfile jar:file:/C:/apacheAnt/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/C:/apacheAnt/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
    Importing file C:\projects\utils.xml from C:\projects\FlexUnit4CIListener\build.xml
    Overriding previous definition of reference to ant.projectHelper
    parsing buildfile C:\projects\utils.xml with URI = file:/C:/projects/utils.xml
    [macrodef] creating macro  gpg
    [macrodef] creating macro  sonatype-bundle
    Overriding previous definition of reference to ant.projectHelper
    [property] Loading Environment env.
    Property "build.version" has not been set
    Property "build.number" has not been set
    Property "build.sdk" has not been set
    Build sequence for target(s) `clean' is [clean]
    Complete build sequence is [clean, init, compile, report, package, deploy, ]
    clean:
       [delete] Deleting directory C:\projects\FlexUnit4CIListener\target
       [delete] Deleting directory C:\projects\FlexUnit4CIListener\target\bin
       [delete] Deleting directory C:\projects\FlexUnit4CIListener\target\docs
       [delete] Deleting directory C:\projects\FlexUnit4CIListener\target\sonatype
       [delete] Deleting directory C:\projects\FlexUnit4CIListener\target
       [delete] Deleting C:\projects\FlexUnit4CIListener\libs\flexunit-4.1.0-x-as3_y.y.y.y.swc
    Build sequence for target(s) `package' is [init, compile, report, package]
    Complete build sequence is [init, compile, report, package, clean, deploy, ]
    init:
        [mkdir] Skipping C:\projects\FlexUnit4CIListener\libs because it already exists.
        [mkdir] Created dir: C:\projects\FlexUnit4CIListener\target
        [mkdir] Created dir: C:\projects\FlexUnit4CIListener\target\sonatype
        [mkdir] Created dir: C:\projects\FlexUnit4CIListener\target\bin
        [mkdir] Created dir: C:\projects\FlexUnit4CIListener\target\docs
         [copy] Copying 1 file to C:\projects\FlexUnit4CIListener\libs
         [copy] Copying C:\projects\FlexUnit4\target\flexunit-4.1.0-x-as3_y.y.y.y.swc to C:\projects\FlexUnit4CIListener\libs\flexunit-4.1.0-x-as3_y.y.y.y.swc
    compile:
        [compc] Loading configuration file C:\flexunit\frameworks\flex-config.xml
        [compc] Adobe Compc (Flex Component Compiler)
        [compc] Version 3.6.0 build 16995
        [compc] Copyright (c) 2004-2007 Adobe Systems, Inc. All rights reserved.
        [compc]
        [compc] command line: Error: configuration variable 'output' value contains unknown token 'build.version'
        [compc]
        [compc] Use 'compc -help' for information about using the command line.
    BUILD FAILED
    C:\projects\FlexUnit4CIListener\build.xml:50: compc task failed
            at flex.ant.FlexTask.executeInProcess(FlexTask.java:299)
            at flex.ant.FlexTask.execute(FlexTask.java:225)
            at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
            at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:601)
            at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
            at org.apache.tools.ant.Task.perform(Task.java:348)
            at org.apache.tools.ant.Target.execute(Target.java:390)
            at org.apache.tools.ant.Target.performTasks(Target.java:411)
            at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
            at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
            at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
            at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
            at org.apache.tools.ant.Main.runBuild(Main.java:809)
            at org.apache.tools.ant.Main.startAnt(Main.java:217)
            at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
            at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
    Total time: 1 second
    build.version, build.number & build.sdk are properties that are not being set.  I would assume that they should be set internally somehow.  However, if I manually set them via -D switches (with arbitrary values) I get the following:
    >ant -v clean package -Dbuild.version=1.2.3.4 -Dbuild.number=666 -Dbuild.sdk=4.1
    function(){return A.apply(null,[this].concat($A(arguments)))}
    Apache Ant(TM) version 1.8.2 compiled on December 20 2010
    Trying the default build file: build.xml
    Buildfile: C:\projects\FlexUnit4CIListener\build.xml
    Detected Java version: 1.7 in: C:\Program Files\Java\jdk1.7.0\jre
    Detected OS: Windows XP
    parsing buildfile C:\projects\FlexUnit4CIListener\build.xml with URI = file:/C:/projects/FlexUnit4CIListener/build.xml
    Project base dir set to: C:\projects\FlexUnit4CIListener
    parsing buildfile jar:file:/C:/apacheAnt/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/C:/apacheAnt/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
    Importing file C:\projects\utils.xml from C:\projects\FlexUnit4CIListener\build.xml
    Overriding previous definition of reference to ant.projectHelper
    parsing buildfile C:\projects\utils.xml with URI = file:/C:/projects/utils.xml
    [macrodef] creating macro  gpg
    [macrodef] creating macro  sonatype-bundle
    Overriding previous definition of reference to ant.projectHelper
    [property] Loading Environment env.
    Build sequence for target(s) `clean' is [clean]
    Complete build sequence is [clean, init, compile, report, package, deploy, ]
    clean:
       [delete] Deleting directory C:\projects\FlexUnit4CIListener\target
       [delete] Deleting directory C:\projects\FlexUnit4CIListener\target\bin
       [delete] Deleting directory C:\projects\FlexUnit4CIListener\target\docs
       [delete] Deleting directory C:\projects\FlexUnit4CIListener\target\sonatype
       [delete] Deleting directory C:\projects\FlexUnit4CIListener\target
       [delete] Deleting C:\projects\FlexUnit4CIListener\libs\flexunit-4.1.0-x-as3_y.y.y.y.swc
    Build sequence for target(s) `package' is [init, compile, report, package]
    Complete build sequence is [init, compile, report, package, clean, deploy, ]
    init:
        [mkdir] Skipping C:\projects\FlexUnit4CIListener\libs because it already exists.
        [mkdir] Created dir: C:\projects\FlexUnit4CIListener\target
        [mkdir] Created dir: C:\projects\FlexUnit4CIListener\target\sonatype
        [mkdir] Created dir: C:\projects\FlexUnit4CIListener\target\bin
        [mkdir] Created dir: C:\projects\FlexUnit4CIListener\target\docs
         [copy] Copying 1 file to C:\projects\FlexUnit4CIListener\libs
         [copy] Copying C:\projects\FlexUnit4\target\flexunit-4.1.0-x-as3_y.y.y.y.swc to C:\projects\FlexUnit4CIListener\libs\flexunit-4.1.0-x-as3_y.y.y.y.swc
    compile:
        [compc] Loading configuration file C:\flexunit\frameworks\flex-config.xml
        [compc] C:\projects\FlexUnit4CIListener\target\bin\flexunit-cilistener-1.2.3.4-666-4.1.swc (11773 bytes)
    report:
    Skipped because property 'build.report' not set.
    package:
         [copy] Copying 1 file to C:\projects\FlexUnit4CIListener\target
         [copy] Copying C:\projects\FlexUnit4CIListener\target\bin\flexunit-cilistener-1.2.3.4-666-4.1.swc to C:\projects\FlexUnit4CIListener\target\flexunit-cilistener-1.2.3.4-666-4.1.swc
    BUILD SUCCESSFUL
    Total time: 4 seconds
    I can see where the previous 3 properties are being used in the swc output file name, but now there is a build.report property that is not being set.  How do I know which properties need to be set, and what to set them to?

    I was using the 4.5.1 flex SDK but there seemed to be other issues so I just used the link directly from the Ant Task Setup page (instead of using the newest SDK).  Upon following your instructions to ant build from the root directory, everything seemed to work correctly with a few exceptions.  Below is the last part of the output from the build.
    function(){return A.apply(null,[this].concat($A(arguments)))}
    test:
    Detected Java version: 1.7 in: C:\Program Files\Java\jdk1.7.0\jre
    Detected OS: Windows XP
    Project base dir set to: C:\projects\FlexUnit4Test
          [ant] calling target(s) [test] in build file C:\projects\FlexUnit4Test\build.xml
    parsing buildfile C:\projects\FlexUnit4Test\build.xml with URI = file:/C:/projects/FlexUnit4Test/build.xml
    Project base dir set to: C:\projects\FlexUnit4Test
    [property] Loading Environment env.
    Override ignored for property "FLEX_HOME"
    Property "env.FLEX_COVER_VIEWER" has not been set
    [macrodef] creating macro  compile-runner
    [macrodef] creating macro  execute-tests
    [macrodef] creating macro  execute-tests-using-flexcover
    [macrodef] creating macro  generate-html-report
          [ant] Entering C:\projects\FlexUnit4Test\build.xml...
    Build sequence for target(s) `test' is [init, test-only, test-and-instrument, test]
    Complete build sequence is [init, test-only, test-and-instrument, test, clean, ]
    init:
        [mkdir] Created dir: C:\projects\FlexUnit4Test\target
        [mkdir] Created dir: C:\projects\FlexUnit4Test\target\bin
        [mkdir] Created dir: C:\projects\FlexUnit4Test\target\report\xunit\flex
        [mkdir] Created dir: C:\projects\FlexUnit4Test\target\report\xunit\as3
        [mkdir] Created dir: C:\projects\FlexUnit4Test\target\report\flexcover
         [copy] Copying 5 files to C:\projects\FlexUnit4Test\libs
         [copy] Copying C:\projects\FlexUnit4CIListener\target\flexunit-cilistener-4.1.0-x-y.y.y.y.swc to C:\projects\FlexUnit4Test\libs\flexunit-cilistener-4.1.0-x-y.y.y.y.swc
         [copy] Copying C:\projects\FlexUnit4FluintExtensions\target\fluint-extensions-4.1.0-x-y.y.y.y.swc to C:\projects\FlexUnit4Test\libs\fluint-extensions-4.1.0-x-y.y.y.y.swc
         [copy] Copying C:\projects\FlexUnit4\target\flexunit-4.1.0-x-as3_y.y.y.y.swc to C:\projects\FlexUnit4Test\libs\flexunit-4.1.0-x-as3_y.y.y.y.swc
         [copy] Copying C:\projects\FlexUnit4\target\flexunit-4.1.0-x-flex_y.y.y.y.swc to C:\projects\FlexUnit4Test\libs\flexunit-4.1.0-x-flex_y.y.y.y.swc
         [copy] Copying C:\projects\FlexUnit4FlexCoverListener\target\flexunit-flexcoverlistener-4.1.0-x-y.y.y.y. swc to C:\projects\FlexUnit4Test\libs\flexunit-flexcoverlistener-4.1.0-x-y.y.y.y.swc
         [copy] Copying 1 file to C:\projects\FlexUnit4Test\libs\build
         [copy] Copying C:\projects\FlexUnit4AntTasks\target\flexUnitTasks-4.1.0-x.jar to C:\projects\FlexUnit4Test\libs\build\flexUnitTasks-4.1.0-x.jar
    test-only:
         [echo] Testing FlexUnit Flex build...
        [mxmlc] Loading configuration file C:\flexunit\frameworks\flex-config.xml
        [mxmlc] C:\projects\FlexUnit4Test\target\bin\TestRunner-flex.swf (924564 bytes)
    [flexunit] Validating task attributes ...
    [flexunit] Generating default values ...
    [flexunit] Using default working dir [C:\projects\FlexUnit4Test]
    [flexunit] Using the following settings for the test run:
    [flexunit]  FLEX_HOME: [C:\flexunit]
    [flexunit]  haltonfailure: [false]
    [flexunit]  headless: [false]
    [flexunit]  display: [99]
    [flexunit]  localTrusted: [true]
    [flexunit]  player: [flash]
    [flexunit]  port: [1024]
    [flexunit]  swf: [C:\projects\FlexUnit4Test\target\bin\TestRunner-flex.swf]
    [flexunit]  timeout: [60000ms]
    [flexunit]  toDir: [C:\projects\FlexUnit4Test\target\report\xunit\flex]
    [flexunit] Setting up server process ...
    [flexunit] Starting server ...
    [flexunit] Entry [C:\projects\FlexUnit4Test\target\bin] already available in local trust file at [C:\Documents and Settings\Administrator\Application Data\Macromedia\Flash Player\#Security\FlashPlayerTrust\flexUnit.cfg].
    [flexunit] Executing 'rundll32' with arguments:
    [flexunit] 'url.dll,FileProtocolHandler'
    [flexunit] 'C:\projects\FlexUnit4Test\target\bin\TestRunner-flex.swf'
    [flexunit]
    [flexunit] The ' characters around the executable and arguments are
    [flexunit] not part of the command.
    [flexunit]
    [flexunit] Opening server socket on port [1024].
    [flexunit] Waiting for client connection ...
    [flexunit]
    [flexunit] Stopping server ...
    [flexunit] End of test data reached, sending acknowledgement to player ...
    [flexunit] Closing client connection ...
    [flexunit] Closing server on port [1024] ...
          [ant] Exiting C:\projects\FlexUnit4Test\build.xml.
    After this part of the log I get the following:
    function(){return A.apply(null,[this].concat($A(arguments)))}
    BUILD FAILED
    C:\projects\build.xml:103: The following error occurred while executing this line:
    C:\projects\FlexUnit4Test\build.xml:180: The following error occurred while executing this line:
    C:\projects\FlexUnit4Test\build.xml:62: java.util.concurrent.ExecutionException: Socket timeout waiting for flexunit report
            at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
            at java.util.concurrent.FutureTask.get(FutureTask.java:111)
            at org.flexunit.ant.tasks.TestRun.run(Unknown Source)
            at org.flexunit.ant.tasks.FlexUnitTask.execute(Unknown Source)
            at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
            at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:601)
            at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
            at org.apache.tools.ant.Task.perform(Task.java:348)
            at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
            at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
            at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:601)
            at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
            at org.apache.tools.ant.Task.perform(Task.java:348)
            at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
            at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
            at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:601)
            at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
            at org.apache.tools.ant.Task.perform(Task.java:348)
            at org.apache.tools.ant.Target.execute(Target.java:390)
            at org.apache.tools.ant.Target.performTasks(Target.java:411)
            at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
            at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:3 8)
            at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
            at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
            at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
            at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:601)
            at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
            at org.apache.tools.ant.Task.perform(Task.java:348)
            at org.apache.tools.ant.Target.execute(Target.java:390)
            at org.apache.tools.ant.Target.performTasks(Target.java:411)
            at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
            at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
            at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
            at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
            at org.apache.tools.ant.Main.runBuild(Main.java:809)
            at org.apache.tools.ant.Main.startAnt(Main.java:217)
            at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
            at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
    Caused by: Socket timeout waiting for flexunit report
            at org.flexunit.ant.FlexUnitSocketServer.start(Unknown Source)
            at org.flexunit.ant.FlexUnitSocketThread.call(Unknown Source)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
            at java.util.concurrent.FutureTask.run(FutureTask.java:166)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
            at java.lang.Thread.run(Thread.java:722)
    Caused by: java.net.SocketTimeoutException: Accept timed out
            at java.net.TwoStacksPlainSocketImpl.socketAccept(Native Method)
            at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:396)
            at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:183)
            at java.net.ServerSocket.implAccept(ServerSocket.java:522)
            at java.net.ServerSocket.accept(ServerSocket.java:490)
            at org.flexunit.ant.FlexUnitSocketServer.openClientSocket(Unknown Source)
            ... 7 more
    Total time: 1 minute 38 seconds
    So everything seems to be building correctly now, but not executing correctly.  Also, there are still a number of properties that are not being set:
    function(){return A.apply(null,[this].concat($A(arguments)))}
    report:
    Skipped because property 'build.report' not set.
    instrument-compile:
    Skipped because property 'build.instrument' not set.
    package-instrument:
    Skipped because property 'build.instrument' not set.
    pmdReport:
    Skipped because property 'build.pmd' not set.
    Where should these values be set and what are appropriate values?  What could be causing the socket timeout and what exactly is it waiting for or attempting to accomplish with the sockets?
    The end goal is to be able to use the flex SDK, flexunit and ANT on a linux server to automate my build/test process.  I am currently just trying to get ANT to work with the flex SDK and flexunit on a windows XP box so I can see what the output should be and how the whole system works before trying to inject it into my CI system.

  • Initial content not found

    Hi,
    I try to use FlexUnit 4 to test an air application. I use Maven antrun plugin to compile and run test
    code since flex-mojos do not support FlexUnit 4 yet.
    My antrun plugin is as follows,
               <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>1.3</version>
                    <executions>
                        <execution>
                            <id>flexunit4-test-compile</id>
                            <phase>test-compile</phase>
                            <configuration>
                                <tasks>
                                    <!-- You can set this directly so mxmlc will work correctly, or set FLEX_HOME as an environment variable and use as below -->
                                    <!--property name="FLEX_HOME" location="${env.FLEX_HOME}"/-->
                                    <property name="FLEX_HOME" value="${flex.home}"/>
                                    <taskdef resource="flexTasks.tasks"/>
                                    <taskdef resource="net/sf/antcontrib/antlib.xml"
                                             classpathref="maven.compile.classpath"/>
                                    <!-- Compile TestRunner.mxml as a SWF -->
                                    <mxmlc file="${project.build.testSourceDirectory}/TestRunner.mxml"
                                           output="${project.build.testOutputDirectory}/TestRunner.swf">
                                        <source-path path-element="${project.build.sourceDirectory}"/>
                                        <source-path path-element="${project.build.testSourceDirectory}"/>
                                        <load-config filename="${FLEX_HOME}/frameworks/air-config.xml"/>
                                        <compiler.library-path dir="${basedir}/target/dependency" append="true">
                                            <include name="*.*"/>
                                        </compiler.library-path>
                                        <compiler.verbose-stacktraces>true</compiler.verbose-stacktraces>
                                        <compiler.headless-server>true</compiler.headless-server>
                                    </mxmlc>
                                </tasks>
                            </configuration>
                            <goals>
                                <goal>run</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>flexunit4-test-run</id>
                            <phase>test</phase>
                            <configuration>
                                <tasks>
                                    <!-- Execute TestRunner.swf as FlexUnit tests and publish reports -->
                                    <!--
                                       Flex-Mojos will update the FlashPlayer trusted cache for you automagically so you don't have to have flexunit do so.
                                       Also haltonfailure should be marked true to keep with the convention in Maven that the build fails if tests fail.
                                    -->
                                    <taskdef resource="flexUnitTasks.tasks"/>
                                    <exec executable="${flex.home}/bin/adl" failonerror="false" osfamily="unix">
                                        <arg value="${project.build.testOutputDirectory}/TestRunner-app.xml"/>
                                        <arg value="--"/>
                                        <arg value="${project.build.testOutputDirectory}"/>
                                    </exec>
                                    <exec executable="${flex.home}/bin/adl.exe" failonerror="false" osfamily="windows">
                                        <arg value="${project.build.testOutputDirectory}/TestRunner-app.xml"/>
                                        <arg value="--"/>
                                        <arg value="${project.build.testOutputDirectory}"/>
                                    </exec>
                                    <!--flexunit swf="${project.build.testOutputDirectory}/TestRunner.swf"
                                              toDir="${project.build.directory}/surefire-reports"
                                              haltonfailure="true"
                                              verbose="true"
                                              localTrusted="false"/-->
                                </tasks>
                            </configuration>
                            <goals>
                                <goal>run</goal>
                            </goals>
                        </execution>
                    </executions>
                    <dependencies>
                        <!-- You will need to manually install all of the artifacts below in your local Maven repository or shared repository if you have one -->
                        <dependency>
                            <groupId>com.adobe.flex</groupId>
                            <artifactId>flexTasks</artifactId>
                            <version>${flex-sdk.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.flexunit</groupId>
                            <artifactId>anttasks</artifactId>
                            <version>4.0.0</version>
                        </dependency>
                    </dependencies>
                </plugin>
    TestRunner.swf is built at target/test-class and I also have TestRunner-app.xml in the same directory where I have
            <content>TestRunner</content>
    The problem is that when I try to run a test, I keep getting the following error
    [exec] initial content not found
    I really appreciate if someone could shred some light on this problem.
    Thanks,
    John

    Hi Brian,
    Thanks for your reply!
    I've tried building with every version of Ant and FlexUnit I could find, including the latest beta... same problem every time. Though I haven't tried using a different Flex SDK - my project uses 3.2.0. Could that be causing problems? All the FlexUnit versions I can find are for 3.5 or later.
    Below is the full console output from my build script (using the flexunit task rather than exec). As for the descriptor file, if you mean the one created by the FlexUnit task, I'm afraid I have nothing to post... since the error is that the task isn't able to create it in the first place. (Or if it is being created, it sure isn't anywhere I can find it - see below for screenshot of project contents.) I can post the descriptor I wrote myself if that will be of any use - just let me know.
    Thank you so much for your help!
    Helen
    -------------- CONSOLE OUTPUT ---------------
    Apache Ant version 1.7.1 compiled on June 27 2008
    Buildfile: C:\build\dev\helen_ant\apps\flex_dev\flex\acdc\build.xml
    parsing buildfile C:\build\dev\helen_ant\apps\flex_dev\flex\acdc\build.xml with URI = file:/C:/build/dev/helen_ant/apps/flex_dev/flex/acdc/build.xml
    Project base dir set to: C:\build\dev\helen_ant\apps\flex_dev\flex\acdc
    [antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found.
    Build sequence for target(s) `all' is [clean-swf, build-swf, clean-installer, compile-test, test-flex, build-installer, all]
    Complete build sequence is [clean-swf, build-swf, clean-installer, compile-test, test-flex, build-installer, all, test-reports-flex, final-clean, ]
    clean-swf:
       [delete] Deleting C:\build\dev\helen_ant\apps\flex_dev\flex\acdc\acdc.swf
    build-swf:
    dropping C:\C from path as it doesn't exist
    dropping C:\C from path as it doesn't exist
        [mxmlc] Loading configuration file C:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0\frameworks\air-config.xml
        [mxmlc] C:\build\dev\helen_ant\apps\flex_dev\flex\acdc\acdc.swf (2391282 bytes)
    clean-installer:
    compile-test:
    dropping C:\C from path as it doesn't exist
    dropping C:\C from path as it doesn't exist
        [mxmlc] Loading configuration file C:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0\frameworks\air-config.xml
        [mxmlc] C:\build\dev\helen_ant\apps\flex_dev\flex\acdc\src\acdcunittest.swf (2744014 bytes)
    test-flex:
    [flexunit] Validating task attributes ...
    [flexunit] Generating default values ...
    [flexunit] Using the following settings for the test run:
    [flexunit]     FLEX_HOME: [C:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0]
    [flexunit]     haltonfailure: [false]
    [flexunit]     headless: [false]
    [flexunit]     display: [99]
    [flexunit]     localTrusted: [true]
    [flexunit]     player: [air]
    [flexunit]     port: [1024]
    [flexunit]     swf: [C:\build\dev\helen_ant\apps\flex_dev\flex\acdc\src\acdcunittest.swf]
    [flexunit]     timeout: [60000ms]
    [flexunit]     toDir: [C:\build\dev\helen_ant\apps\flex_dev\flex\acdc\unit_test_reports\xml]
    [flexunit] Setting up server process ...
    [flexunit] Starting server ...
    [flexunit] OS: [Windows]
    [flexunit] Opening server socket on port [1024].
    [flexunit] Waiting for client connection ...
    [flexunit] Launching player:
         [null] Executing 'C:\Program Files\Adobe\Flex Builder 3\jre\bin\java.exe' with arguments:
         [null] '-jar'
         [null] 'C:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0\lib\adt.jar'
         [null] '-version'
         [null]
         [null] The ' characters around the executable and arguments are
         [null] not part of the command.
         [null] Output redirected to property: AIR_VERSION
    [flexunit] Found AIR version: 2.0
    BUILD FAILED
    C:\build\dev\helen_ant\apps\flex_dev\flex\acdc\build.xml:97: Error launching the test runner.
        at org.flexunit.ant.tasks.TestRun.run(Unknown Source)
        at org.flexunit.ant.tasks.FlexUnitTask.execute(Unknown Source)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefau ltExecutor.java:32)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
        at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
    Caused by: Error launching the test runner.
        at org.flexunit.ant.tasks.TestRun.launchTestSuite(Unknown Source)
        ... 18 more
    Caused by: Could not create application descriptor
        at org.flexunit.ant.launcher.commands.player.AdlCommand.createApplicationDescriptor(Unknown Source)
        at org.flexunit.ant.launcher.commands.player.AdlCommand.launch(Unknown Source)
        at org.flexunit.ant.launcher.FlexUnitLauncher.runTests(Unknown Source)
        ... 19 more
    --- Nested Exception ---
    Error launching the test runner.
        at org.flexunit.ant.tasks.TestRun.launchTestSuite(Unknown Source)
        at org.flexunit.ant.tasks.TestRun.run(Unknown Source)
        at org.flexunit.ant.tasks.FlexUnitTask.execute(Unknown Source)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefau ltExecutor.java:32)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
        at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
    Caused by: Could not create application descriptor
        at org.flexunit.ant.launcher.commands.player.AdlCommand.createApplicationDescriptor(Unknown Source)
        at org.flexunit.ant.launcher.commands.player.AdlCommand.launch(Unknown Source)
        at org.flexunit.ant.launcher.FlexUnitLauncher.runTests(Unknown Source)
        ... 19 more
    --- Nested Exception ---
    Could not create application descriptor
        at org.flexunit.ant.launcher.commands.player.AdlCommand.createApplicationDescriptor(Unknown Source)
        at org.flexunit.ant.launcher.commands.player.AdlCommand.launch(Unknown Source)
        at org.flexunit.ant.launcher.FlexUnitLauncher.runTests(Unknown Source)
        at org.flexunit.ant.tasks.TestRun.launchTestSuite(Unknown Source)
        at org.flexunit.ant.tasks.TestRun.run(Unknown Source)
        at org.flexunit.ant.tasks.FlexUnitTask.execute(Unknown Source)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefau ltExecutor.java:32)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
        at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
    Total time: 1 minute 31 seconds

  • Execute TestRunner on Server

    I am completely new to Flex and FlexUnit. I am trying to execute a unit test that tests whether a rest webservice call generates the correct output. I am using the FlexUnit Ant task and I deploy the TestRunner.swf to the server where I want to TestRunner to run/execute the test, so that the rest call can be made properly. When I try this from the browser it works perfectly, but when I put the following in the Ant Task I get and error. Can anyone PLEASE help me with this??? What am I doing wrong???
    <flexunit
       player="flash"
       swf=http://localhost:8080/TestRunner.swf
       toDir="${reports.dir}"
       haltonfailure="false"
       verbose="true"
       localTrusted="true"/>
    I get this error:
    Build Faild: the provided swf property value C:\User\workspace\flexunit\https:\localhost:8080:TestRunner.swf could not be found.

    @bkinlaw - Just to split hairs, typically I like ot classify testing into 3 general categories: unit, integration, and functional.  Tools like FlexMonkey, RIATest, and SeleniumFlex fall into the category of functional testing.  These tools will test your software as a black-box verifying requirements based on feedback, in Flex's case, from the UI.  FlexUnit has the capabilities to work within the context of unit and integration testing.  Loosely defined, unit testing being the validation of a particular class, its properties, and behaviors and integration testing being the validation of the interaction of a series of class behaviors.  To better achieve your goal of unti and integration testing with FlexUnit, check out the FlexUnit wiki on integration testing UI components and asynchronous events (http://docs.flexunit.org/index.php?title=Using_Asynchronous_Startup).  If you're looking to get better test coverage via unit testing, check out some of the mock object libraries for AS3 to help you get there.  I use mockolate (http://github.com/drewbourne/mockolate), but mockito-flex (http://bitbucket.org/loomis/mockito-flex/wiki/Home) and asmock are also popular; they work in a very similar fashion to mock object libraries in Java such as EasyMock and JMock.  For more OSS solutions with respect to testing, builds, CI, etc. check out our Community Projects on the wiki for more ideas @ http://docs.flexunit.org/index.php?title=Community_Projects.
    In terms of FlexUnit 4.1, bleeding edge builds are always available on the CI server (http://builds.flexunit.org).  I believe that we may have a beta within the month of May for people to start messing with as well, but I can't promise anything.  Hope this helps to shed some light on the options available for tesitng in the Flex/AS3 world.
    -Brian

  • TestRunner Hangs or ExecutionException: java.lang.NumberFormatException

    I'm attempting to get my unit tests setup to run automatically with my Ant build and take one path or the other if they fail or not. I used the SampleCIProject as an example and got it to run just fine. However, when I recreate the structure in my project I am getting some weird behavior that I have wasted a lot of time trying to figure out. When I duplicate the SampleTest.as class my Ant build runs as expected. However if I throw an [Ignore] tag above the first test I get the java exception telling me it is expecting a number and getting "NaN'. It seems to be hit or miss depending on where I put the [Ignore] lines and the resulting exception. Also I find that if I put in only one test and [Ignore] it, when FlexUnit task executes and the TestRunner.swf pops up it stays up and hangs the process. It does not shut down automatically. Upon closing the swf the process does nto complete, just sits there in this hung state.
    I'm not creating my own TestRunner.mxml as it seems to be automatically created. I did try creating my own but I notice that the resulting TestRunner.mxml in the dist folder is the one that is automatically generated vs the one I created.
    I'm using the 4.1.0-beta2.19-sdk3.5.0.12683 build if that helps.  Does anyone have any idea what's going on? If not, does anyone know how I can set myself up to debug the ant task and FlexUnit code so I can try to find out what's going on? I can't seem to even find if/where the java exception being thrown has a full stack trace sent to a log somewhere.

    This sounds like an error in the CIListener to me. I will need to confirm, but the quick guess is that the Ignore is probably trying to output the time since the last test execution. Since it is the first one causing the problem, my guess is that the variable holding the time has not been initialized and is null. I am guessing the code concatenates that into some weird mess and probably sends it over to Java, which freaks out trying to interpret it into a number.
    I won't be able to check for an hour or two, but if you want to verify yourself, I would look in the CIListener and look for ramifications of the testIgnored() method being called before whatever variable holds the time is initialized.
    Another quick and dirty way to test would be to change the CIListener. It has a method, something like testTimeStr() which returns the time represented as a string. Just make it always return '0' and see if the problem goes away.
    Mike

  • Import config file on new OSB - error

    Hi,
    I used python scripts to import sbconfig.jar on OSB, and on previous version of OSB they worked perfectly.
    Now they don't. I tried to integrate them with TeamCity, and when launching script I get
    [11:17:54]: [java] Problem invoking WLST - Traceback (innermost last):[11:17:54]: [java] File "D:\TeamCity\buildAgSmith\BuildAgent\work\19084524096e640\osb_cofiguration\scripts\import_export_config_from_osb\import\import.py", line 203, in ?[11:17:54]: [java] File D:\TeamCity\buildAgSmith\BuildAgent\work\19084524096e640\osb_cofiguration\scripts\import_export_config_from_osb\import\import.py", line 44, in importToALSBDomain[11:17:54]: [java] File "D:\TeamCity\buildAgSmith\BuildAgent\work\19084524096e640\osb_cofiguration\scripts\import_export_config_from_osb\import\import.py", line 193, in getSessionManagementMBean
    [11:17:54]: [java] File "<iostream>", line 1162, in findService
    [11:17:54]: [java]      at weblogic.management.jmx.MBeanServerInvocationHandler.newProxyInstance(MBeanServerInvocationHandler.java:621)
    [11:17:54]: [java]      at weblogic.management.jmx.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:418)
    [11:17:54]: [java]      at $Proxy11.findService(Unknown Source)
    [11:17:54]: [java]      at weblogic.management.scripting.WLScriptContext.findService(WLScriptContext.java:209)
    [11:17:54]: [java]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [11:17:54]: [java]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [11:17:54]: [java]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [11:17:54]: [java]      at java.lang.reflect.Method.invoke(Method.java:597)
    [11:17:54]: [java] java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.bea.wli.sb.management.configuration.DelegatedSessionManagementMBean
    [11:17:55]: [java] Java Result: 1
    The error happens here:
    print 'Read file', importJar
    sessionName = createSessionName()
    print 'Created session', sessionName
    SessionMBean = getSessionManagementMBean(sessionName)
    print 'SessionMBean started session'
    ALSBConfigurationMBean = findService(String("ALSBConfiguration.").concat(sessionName), "com.bea.wli.sb.management.configuration.ALSBConfigurationMBean")
    print "ALSBConfiguration MBean found", ALSBConfigurationMBean
    log is :
    Read file D:\TeamCity\buildAgSmith\BuildAgent\work\19084524096e640\osb_cofiguration\config_file\sbconfig.jar
    [11:17:54]: [java] Created session SessionScript1275898674802
    [11:17:54]: [java] Unexpected error: java.lang.RuntimeException
    [11:17:54]: [java] Unexpected error: java.lang.RuntimeException
    [11:17:54]: [java] No stack trace available.
    The strangest that I couldnt find anything about this com.bea.wli.sb.management.configuration.DelegatedSessionManagementMBean.
    Any help appreciated. Thanks.
    UPDATE: Is there any possibility to import configuration project on 11g OSB?
    Edited by: frf on 7/6/2010 3:21

    http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15022/app_config.htm#i1012336
    http://download.oracle.com/docs/cd/E14571_01/apirefs.1111/e15033/toc.htm
    To upgrade AquaLogic Service Bus (2.6 and 3.0) and Oracle Service Bus (10.3.1.0) configuration to Oracle Service Bus 11g Release 1 (11.1.1.3) -
    http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15032/upgrade.htm#sthref11
    The ALSBConfigurationMBean Interface in the com.bea.wli.sb.management.configuration package in the Oracle Fusion Middleware Java API Reference for Oracle Service Bus includes example code illustrating how to import and export Oracle Service Bus configurations, how to change environment values, how to query resources, and so on. Please find it here -
    http://download.oracle.com/docs/cd/E14571_01/apirefs.1111/e15033/toc.htm
    Regards,
    Anuj
    Edited by: Anuj Dwivedi, TCS on Jun 7, 2010 5:02 PM

  • Strange behaviour when running parameterized test

    Hello,
    I am using Flex 4.5 and FlexUnit 4.1 inside of the Flashdevelop IDE and I am experiencing some very strange behaviour.
    If I have 5 parameters to my test the test runs fine. When I add a sixth parameter of the type Array, I get the following error:
    "TypeError: Error #1009: Cannot access a property or method of a null object reference."
    Please see below for my example code.
    The following parameterized test case runs without a problem:
    package {
        import org.flexunit.runners.Parameterized;
        [RunWith('org.flexunit.runners.Parameterized')]
        public class ParameterizedTest {
            [Parameters]
            public static var testData:Array = [
                [1,1,new Array(),1,1]
            public function ParameterizedTest(
                param1:uint,
                param2:uint,
                param3:Array,
                param4:uint,
                param5:uint
            ):void {
            [Test]
            public function testOne():void {
                // Test to go here.
    When I add an Array as the sixth parameter :
    package {
        import org.flexunit.runners.Parameterized;
        [RunWith('org.flexunit.runners.Parameterized')]
        public class ParameterizedTest {
            [Parameters]
            public static var testData:Array = [
                [1,1,new Array(),1,1,new Array()]
            public function ParameterizedTest(
                param1:uint,
                param2:uint,
                param3:Array,
                param4:uint,
                param5:uint,
                param6:Array
            ):void {
            [Test]
            public function testOne():void {
                // Test to go here.
    I get this error :
    com.berog.proj_drum_machine.tests.matrix_test_suite.test_cases::MatrixConstructorTest.test One (1,1,,1,1,) .
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at flex.lang.reflect::Constructor/newInstanceApply()[E:\hudson\jobs\FlexUnit4-Flex4.1\worksp ace\FlexUnit4\src\flex\lang\reflect\Constructor.as:253]
        at TestClassRunnerForParameters/createTest()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\Flex Unit4\src\org\flexunit\runners\Parameterized.as:455]
        at org.flexunit.runners::BlockFlexUnit4ClassRunner/methodBlock()[E:\hudson\jobs\FlexUnit4-Fl ex4.1\workspace\FlexUnit4\src\org\flexunit\runners\BlockFlexUnit4ClassRunner.as:314]
        at org.flexunit.runners::BlockFlexUnit4ClassRunner/runChild()[E:\hudson\jobs\FlexUnit4-Flex4 .1\workspace\FlexUnit4\src\org\flexunit\runners\BlockFlexUnit4ClassRunner.as:152]
        at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()[E:\hudson\jobs\FlexUni t4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ChildRunnerSequencer.as: 82]
        at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:141]
        at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[E:\hudson\jobs\F lexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Stateme ntSequencer.as:109]
        at org.flexunit.runners::ParentRunner/run()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexU nit4\src\org\flexunit\runners\ParentRunner.as:483]
        at org.flexunit.runners::Parameterized/runChild()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace \FlexUnit4\src\org\flexunit\runners\Parameterized.as:273]
        at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()[E:\hudson\jobs\FlexUni t4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ChildRunnerSequencer.as: 82]
        at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:141]
        at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[E:\hudson\jobs\F lexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Stateme ntSequencer.as:109]
        at org.flexunit.runners::ParentRunner/run()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexU nit4\src\org\flexunit\runners\ParentRunner.as:483]
        at org.flexunit.runners::Suite/runChild()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUni t4\src\org\flexunit\runners\Suite.as:151]
        at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()[E:\hudson\jobs\FlexUni t4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ChildRunnerSequencer.as: 82]
        at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:141]
        at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[E:\hudson\jobs\F lexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Stateme ntSequencer.as:109]
        at org.flexunit.runners::ParentRunner/run()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexU nit4\src\org\flexunit\runners\ParentRunner.as:483]
        at org.flexunit.runners::Suite/runChild()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUni t4\src\org\flexunit\runners\Suite.as:151]
        at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()[E:\hudson\jobs\FlexUni t4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ChildRunnerSequencer.as: 82]
        at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:141]
        at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[E:\hudson\jobs\F lexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Stateme ntSequencer.as:109]
        at org.flexunit.runners::ParentRunner/run()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexU nit4\src\org\flexunit\runners\ParentRunner.as:483]
        at org.flexunit.runner::FlexUnitCore/beginRunnerExecution()[E:\hudson\jobs\FlexUnit4-Flex4.1 \workspace\FlexUnit4\src\org\flexunit\runner\FlexUnitCore.as:348]
        at org.flexunit.runner::FlexUnitCore/runRunner()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\ FlexUnit4\src\org\flexunit\runner\FlexUnitCore.as:307]
        at org.flexunit.runner::FlexUnitCore/runRequest()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace \FlexUnit4\src\org\flexunit\runner\FlexUnitCore.as:283]
        at org.flexunit.runner::FlexUnitCore/runClasses()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace \FlexUnit4\src\org\flexunit\runner\FlexUnitCore.as:269]
        at Function/http://adobe.com/AS3/2006/builtin::apply()
        at org.flexunit.runner::FlexUnitCore/run()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUn it4\src\org\flexunit\runner\FlexUnitCore.as:245]
        at com.berog.proj_drum_machine.tests::TestMain()[E:\Actionscript\projects\DrumMachine\src\co m\berog\proj_drum_machine\tests\TestMain.as:18]
    com.berog.proj_drum_machine.tests.matrix_test_suite.test_cases::MatrixConstructorTest.test One (1,1,,1,1,) E
    Time: 0.013
    There was 1 failure:
    1 com.berog.proj_drum_machine.tests.matrix_test_suite.test_cases::MatrixConstructorTest.tes tOne (1,1,,1,1,) TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at flex.lang.reflect::Constructor/newInstanceApply()[E:\hudson\jobs\FlexUnit4-Flex4.1\worksp ace\FlexUnit4\src\flex\lang\reflect\Constructor.as:253]
        at TestClassRunnerForParameters/createTest()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\Flex Unit4\src\org\flexunit\runners\Parameterized.as:455]
        at org.flexunit.runners::BlockFlexUnit4ClassRunner/methodBlock()[E:\hudson\jobs\FlexUnit4-Fl ex4.1\workspace\FlexUnit4\src\org\flexunit\runners\BlockFlexUnit4ClassRunner.as:314]
        at org.flexunit.runners::BlockFlexUnit4ClassRunner/runChild()[E:\hudson\jobs\FlexUnit4-Flex4 .1\workspace\FlexUnit4\src\org\flexunit\runners\BlockFlexUnit4ClassRunner.as:152]
        at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()[E:\hudson\jobs\FlexUni t4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ChildRunnerSequencer.as: 82]
        at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:141]
        at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[E:\hudson\jobs\F lexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Stateme ntSequencer.as:109]
        at org.flexunit.runners::ParentRunner/run()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexU nit4\src\org\flexunit\runners\ParentRunner.as:483]
        at org.flexunit.runners::Parameterized/runChild()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace \FlexUnit4\src\org\flexunit\runners\Parameterized.as:273]
        at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()[E:\hudson\jobs\FlexUni t4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ChildRunnerSequencer.as: 82]
        at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:141]
        at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[E:\hudson\jobs\F lexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Stateme ntSequencer.as:109]
        at org.flexunit.runners::ParentRunner/run()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexU nit4\src\org\flexunit\runners\ParentRunner.as:483]
        at org.flexunit.runners::Suite/runChild()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUni t4\src\org\flexunit\runners\Suite.as:151]
        at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()[E:\hudson\jobs\FlexUni t4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ChildRunnerSequencer.as: 82]
        at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:141]
        at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[E:\hudson\jobs\F lexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Stateme ntSequencer.as:109]
        at org.flexunit.runners::ParentRunner/run()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexU nit4\src\org\flexunit\runners\ParentRunner.as:483]
        at org.flexunit.runners::Suite/runChild()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUni t4\src\org\flexunit\runners\Suite.as:151]
        at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()[E:\hudson\jobs\FlexUni t4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ChildRunnerSequencer.as: 82]
        at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:141]
        at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[E:\hudson\jobs\F lexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Stateme ntSequencer.as:109]
        at org.flexunit.runners::ParentRunner/run()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexU nit4\src\org\flexunit\runners\ParentRunner.as:483]
        at org.flexunit.runner::FlexUnitCore/beginRunnerExecution()[E:\hudson\jobs\FlexUnit4-Flex4.1 \workspace\FlexUnit4\src\org\flexunit\runner\FlexUnitCore.as:348]
        at org.flexunit.runner::FlexUnitCore/runRunner()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\ FlexUnit4\src\org\flexunit\runner\FlexUnitCore.as:307]
        at org.flexunit.runner::FlexUnitCore/runRequest()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace \FlexUnit4\src\org\flexunit\runner\FlexUnitCore.as:283]
        at org.flexunit.runner::FlexUnitCore/runClasses()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace \FlexUnit4\src\org\flexunit\runner\FlexUnitCore.as:269]
        at Function/http://adobe.com/AS3/2006/builtin::apply()
        at org.flexunit.runner::FlexUnitCore/run()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUn it4\src\org\flexunit\runner\FlexUnitCore.as:245]
        at com.berog.proj_drum_machine.tests::TestMain()[E:\Actionscript\projects\DrumMachine\src\co m\berog\proj_drum_machine\tests\TestMain.as:18]
    FAILURES!!! Tests run: 1, 1 Failures:
    Can anyone help me?

    Actually, I do see what's wrong.
    When you call a method in the ActionScript universe, you can can usually do a function.apply() and pass it a variable number of args. Unfortunately, constructors are the one type of method where this doesn't work. You can't actually do an apply() so we have to fake it by having a map of static functions which each know how to apply a given number of arguments to the constructor. There is a check in the code that tests if the number of arguments you have exceeds what our static map knows how to apply.
    It looks like that check should have thrown the error:
    throw new ArgumentError("Sorry, we can't support constructors with more than " + argMap.length + " args out of the box... yes, its dumb, take a look at Constructor.as to modify on your own");
    It didn't and I am guessing its because there is a border condition here. So, what happening is that we only support up to 5 arguments right now. That number is arbitrary. When it was written it just seemed like a reasonable number, however, this class was written before Parameterized testing was introduced.
    Your three choices right now would be to use the TestNG style of Parameterized testing, which uses functions and not constructor args so it will not suffer this same fate, change the code and compile flexunit for yourself, or we could put a patched Constructor class in your project which fixes it. Longer term, I would like you to file a bug that we should increase the number to 10 or some other quasi-reasonable number. We will never be able to support an infinite number and we will always need to pick som arbitrary line in the sand. It just seems our line should be farther out.
    Mike

  • Integrating deployment of a Batch App Service into a continuous build

    We currently have TeamCity and Octopus Deploy setup to deploy all of our applications running in azure automatically.  We'd like to do the same for our cloud app and app image.
    I read this thread earlier (https://social.msdn.microsoft.com/Forums/azure/en-US/1d55d207-daeb-458e-bb0b-ccf531220481/failed-to-upload-application-image?forum=azurebatch) where it sounded like I could just upload the app and app image zips directly to the
    blob storage account.
    I've gotten to the point where I can update the zips in the clouddrives and greenbutton-cloud-assemblies containers, but the Managed app for the service isn't updated. I can tell because we added a new supported job type to the ApplicationDefinition and
    it doesn't show up in the portal.  Also when I try to submit a job with the new job type it gets rejected saying it's an unknown job type.
    I've downloaded the blobs and used a decompiler to verify that the new job type is in the AppicationDefinition.
    Is there some other thing I need to do to get the service to "re-load" the app? Am I on the wrong track and should attempt this another way?
    thanks,
    matt

    Over the last couple of days, we've been creating new job types and directly uploading our zipped application (we only have 1 application) to the blob containers and we can schedule the newly defined job types without uploading through the batch apps portal.

  • Mock-as3 problem

    Hi,
    Anyone using Mock-as3?  I am and am having a problem.  In a nutshell I created an interface so I could mock the flash ExternalInterface class.  I'm setting expectations prior to calling methods that invoke a mock object built on this interface.  Here's the test code:
             appState.openWindows.push("window1");
             var args:Array = ["window2"];
             mockExternalInterface.mock.method('available').andReturn(true).anyNumberOfTimes;
             mockExternalInterface.mock.method('call').once.withArgs('closeWindow', args);
    //         mockExternalInterface.mock.method('closeWindow').withArgs('closeWindow', "window2").once;
             mockExternalInterface.mock.method('call').withArgs('closeMainWindow').once;
             var event:MenuEvent = new MenuEvent(MenuEvent.ITEM_CLICK);
             event.item = menu.menubarXML.menuitem.(@label == "LogoffAndExit");
             var myMainMenuEvent:MainMenuEvent = new MainMenuEvent(MainMenuEvent.CLICK);
             myMainMenuEvent.menuEvent = event;
             menu.menuHandler(myMainMenuEvent.menuEvent);
    The call to mockExternalInterface.available is working.  I get a "No Expectation set" error for "MockExternalInterface.call(closeWindow,window2) From Mock-as3.  I've tried setting the expectation using both the String "window2" and the Array "args".  Note the "call" method signature - I suspect that this might be the core of the problem.
    (Mock)ExternalInternalInterface.call(functionName:String, ...args);
    Thanks,
    Rich

    I think I may have figured out the cause of the behavior I described below.  The  following article on the FUnit web site  describes a difference between JUnit and FlexUnit behavior WRT equality  comparisons on arrays.  Here's a short snippet from the  article:
    The  intent of ‘assertEquals’ according to xUnit convention is to ensure that the  value of two objects are identical, not that they reference the same object. A second assertion type  ‘assertSame’ exists in JUnit (’areSame’ for NUnit) to ensure that two objects  share the same memory  reference.
    This seems to explain what I was seeing so I did a quick test to see if this is what is going on in  mock-as3 as well  I changed my mock implementation to  store a reference to invocations of the ExternalInterface.call()  method:
    public var callInvocations:Array =  new Array();
    public function call(functionName:String, ...args):*
       callInvocations[callInvocationsCurrentIndex++] =  [functionName, args[0]];
       return null;
    I then checked the results, first  using:
    assertEquals(mockExternalInterface.callInvocations[0], ["closeWindow", "window2"]);
    This failed with a message basically stating that "<closeWindow,window2> doesn't equal  <closeWindow,window2>", the same message I got from  mock-as3.
    Then I changed the check to this:
    assertEquals(mockExternalInterface.callInvocations[0][0], "closeWindow");
    assertEquals(mockExternalInterface.callInvocations[0][1], "window2");
    Now the test passes.  Hmmm, seems like this might explain things.  If true, then mock-as3 will never work correctly for functions that contain a "...rest" argument.  Now if I can only figure out how to contact the mock-as3 guys and let them know what I think I've found.
    Hope this helps someone.
    Cheers,
    Rich

  • FlexUnit is working with FlashBuilder and not working with Build file

    Hi
    I have few flexunit test cases . When I am running those testcases from Flashbuilder FlexUnit plugin I am able to run all the testcases and when I run Build file to run those testcases , build file is launching my testrunner swf file and it is throwing follwoing  runtime error in flash player
    VerifyError: Error #1014: Class flash.events::NativeWindowBoundsEvent could not be found.
    at flash.display::MovieClip/nextFrame()
    at mx.managers::SystemManager/deferredNextFrame()
    at mx.managers::SystemManager/preloader_preloaderDocFrameReadyHandler()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.preloaders::Preloader/timerHandler()
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()
    here is the Build Console log
    [taskdef] Could not load definitions from resource flexTasks.tasks. It could not be found.
    test:
    [mxmlc] C:\Users\user\Documents\workspace\project\bin-debug\projectTestRunner.swf (1626331 bytes)
    [flexunit] Validating task attributes ...
    [flexunit] Generating default values ...
    [flexunit] Using the following settings for the test run:
    [flexunit] FLEX_HOME: [C:\Program Files\Adobe\Adobe Flash Builder for Force.com\sdks\4.5.1.21328]
    [flexunit] haltonfailure: [false]
    [flexunit] headless: [false]
    [flexunit] display: [99]
    [flexunit] localTrusted: [true]
    [flexunit] player: [flash]
    [flexunit] command: [C:\Program Files\Adobe\Adobe Flash Builder for Force.com\sdks\4.5.1.21328\runtimes\player\10.2\win\FlashPlayerDebugger.exe]
    [flexunit] port: [1024]
    [flexunit] swf: [C:\Users\user\Documents\workspace\project\bin-debug\projectTestRunner.swf]
    [flexunit] timeout: [60000ms]
    [flexunit] toDir: [C:\Users\user\Documents\workspace\project\report]
    [flexunit] Setting up server process ...
    [flexunit] Starting server ...
    [flexunit] Opening server socket on port [1024].
    [flexunit] Waiting for client connection ...
    [flexunit] Entry [C:\Users\user\Documents\workspace\project\bin-debug] already available in local trust file at [C:\Users\user\AppData\Roaming\Macromedia\Flash Player\#Security\FlashPlayerTrust\flexUnit.cfg].
    [flexunit] Executing 'C:\Program Files\Adobe\Adobe Flash Builder for Force.com\sdks\4.5.1.21328\runtimes\player\10.2\win\FlashPlayerDebugger.exe' with arguments:
    [flexunit] 'C:\Users\user\Documents\workspace\project\bin-debug\projectTestRunner.swf'
    [flexunit] The ' characters around the executable and arguments are
    [flexunit] not part of the command.
    [flexunit]
    [flexunit] Stopping server ...
    [flexunit] End of test data reached, sending acknowledgement to player ...
    [flexunit] Closing client connection ...
    [flexunit] Closing server on port [1024] ...
    BUILD FAILED
    C:\Users\user\Documents\workspace\project\build\build.xml:33: The following error occurred while executing this line:
    C:\Users\user\Documents\workspace\project\build\build.xml:175: java.util.concurrent.ExecutionException: Socket timeout waiting for flexunit report
    Many thanks for In advance for your help ..

    We had a similar problem in my project.  Took a lot of research and trial and error, but we finally narrowed it down to the resource.properties file.  Turns out that if the file gets too big it causes this problem.  Extending the timeout doesn't help.  You have to break your resource.properties into more granular files to reduce the file size.  This seems to fix the problem.  We have had it happen several times since then and we know how to fix it, so we get it fixed pretty quickly.
    Not sure if this will fix your problem, but it fixed ours.

Maybe you are looking for

  • No portal roles are assigned for this user.If this problem persists, contac

    I am trying to access portal first time using j2ee_admin user. It is saying "No portal roles are assigned for this user.If this problem persists, contact your system administrator." iam using abap+java enginee how config in abap enginne ,iwant which

  • DVD drive does not recognize some media on Satellite A30-514

    I own a Satellite A30-514 laptop with Microsoft xp OS. Just lately, some DVD's (not games) will not play from the drive. some do some don't. It is not a region problem - they are all region 2. Windows does not read the disc when it is inserted and do

  • Wifi card

    Hi, Which wifi card do I need for the apple mac pro? 1,1 2006 Cheers, Adrian.

  • Share Name, Printer Name and display name for End User

    We are being forced to standardize printer names.  So, for example, a printer that is on the print server might have the following properties: NAME: PR25739 SHARE NAME: Clinic Admin Office SERVER NAME: A700500 The share name seems to be pointless - a

  • Service Request Report with related Activities?

    Just curious if anyone has seen or created an SSRS report off the DWDataMart related to Service Requests and corresponding activities?  Specifically I am looking for approval activities and the approvers/status which relate back to Service Requests.