Is there an ant task on FlexUnit to open browser with swf embedded?

Here is the same (unanswered) question asked by someone else: http://forums.adobe.com/thread/740495?tstart=0#740495
Basically I need to open my flex app in a browser window from ant, and the FlexUnit task apparently does not support this.
I have downloaded a sample from FlexMonkey. When they (sample writers) execute flexunit in this sample, one of the arguments to FU is "url". However, I can find no evidence of this version of FU (that uses that "url" argument) existing anywhere. Using the swf argument doesn't work as documented in the previous question above. So I don't know if my problem is Flex version, or it's just not supported by FlexUnit.
I'm using the Flex sdk 3.2.0 and the FU libraries below:
flexunit-4.1.0-33-as3_3.5.0.12683.swc
flexunit-4.1.0-33-flex_3.5.0.12683.swc
flexunit-cilistener-4.1.0-33-3.5.0.12683.swc
flexunit-uilistener-4.1.0-33-3.5.0.12683.swc
flexUnitTasks-4.1.0-33.jar
Please tell me if this issue has been solved and if so what libraries I need to implement it. If it is done for Flex 4.x, but not for Flex 3.2, perhaps you could guide me to the java source for the ant task for Flex 4.x so that I can implement this for Flex 3.2 or Flex 3.x.
thanks,
Phil

@Linden - Have not heard of this side effect from anyone as of yet, but good to know.  Sounds like the file lock is coming from the Flash Player and causing the spawning process (rundll32.exe) to hang around as well.  The FlexUnit team runs on Hudson using the FlexUnit Ant task, but we don't seem to encounter the same issue.  What's the longest interval you've tried to use with the sleep task?  Does the FP ever release its handle to the test SWF on your development machines?
Not sure this is a problem with the FlexUnit Ant task, but in 4.2 we could try to explicitly kill the rundll32 process since we'll have the PID when the task launches it.  Head on over to JIRA and file a feature request for us and I'll see what I can do in the new year.  In the short term though, maybe try upgrading your version of the stand alone debug flash player to see if that helps.  Has anyone else seen this issue?  Could you possible just move the clean target to be called before the xci-test target is run?  Just some suggestions.
-Brian

Similar Messages

  • My laptop (macbook air) asked me which library I wanted to open iphoto with but there were no options of libraries to open it with - I had to create a new library and all of my photos were gone.

    My laptop said I was running out of space on my start up disk and then I opened iphoto and it asked which library I wanted to open it with. There were no options available so I had to create a new library for my iphoto. None of my photos were on iphoto when I opened it again. The same thing happened with my photobooth - all of my photos have disappeared.
    I tried to do alt + command when opening iphoto but it didn't help, however I found some of my photos in the masters folder I found when I right clicked on the iphoto file.
    Please help I have all of my photos from the last 3 years on my iphoto!

    With the amount of information you've provided it's impossible to offer a solution.  We can't see your computer so we need to know the details of your problem and setup, i.e.:
    what version of iPhoto are you using?
    what system version are you running?
    what fixes have you tried?
    have you found where is your original library is located? Is there both an Old Masters and Masters folder in it?
    did you apply any updates or upgrades just prior to the problem occurring?
    how much free space on your boot drive? It's strongly recommended to maintain a minimum of 10-15 GB of free space for optimal system and application performance.

  • 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

  • Ant Task to restart an application in Weblogic Application Server?

    Hi, Is there any ant task available to stop, start, restart and application on weblogic application server 10.3?
    I use wldeploy for deploying the applications but sometimes, I need to just restart the application on the server.

    http://download.oracle.com/docs/cd/E12839_01/web.1111/e13706/ant_tasks.htm

  • [svn] 3105: SDK-15764, SDK-15765 -- Two long standing Ant task bugs.

    Revision: 3105
    Author: [email protected]
    Date: 2008-09-04 15:05:39 -0700 (Thu, 04 Sep 2008)
    Log Message:
    SDK-15764, SDK-15765 -- Two long standing Ant task bugs.
    - Ant Tasks fail when setting fork="true" and there are spaces in the path name
    - Setting fork="true" in Ant Tasks leads to warning
    The issue with spaces is that forked tasks construct a stringified commandline, since Java doesn't allow you to pass real String[] to a new process. When not forking, we can pass the original String[], which makes spaces irrelevent. So the fix uses a Commandline.toString(String[]) which is designed to wrap arguments with spaces correctly with quotes, so the commandline tokenizes correctly.
    Bugs: SDK-15764 SDK-15765
    QA: This affects ant calls for _all_ FlexTasks where fork=true. It would be great if we have tests for both fork="true" and "false" where we tested paths and arguments with and without spaces -- off the top of my head, good ones to try: +flexlib=/path/with spaces/, -define=CONFIG::foo,"bar with spaces", and any other arguments you can think of. Also very important: Test passing space arguments without quotes, with single quotes, with double quotes, with a mixture (illegal), and with a mixture escaping the inner set of quotes (not sure if this should work or not, probably a stupid case to test unless quotes are allowed in paths).
    Doc: No
    Reviewer: Pete
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-15764
    http://bugs.adobe.com/jira/browse/SDK-15765
    http://bugs.adobe.com/jira/browse/SDK-15764
    http://bugs.adobe.com/jira/browse/SDK-15765
    Modified Paths:
    flex/sdk/branches/3.0.x/modules/antTasks/src/flex/ant/FlexTask.java

  • Ant tasks for mxmlc/compc?

    Are there "official" Ant tasks for mxmlc/compc?

        <taskdef name="mxmlc" classname="flex.ant.MxmlcTask" classpath="${flexTasks.jar.loc}" />
        <taskdef name="compc" classname="flex.ant.CompcTask" classpath="${flexTasks.jar.loc}" />

  • Where do I find the ANT task for creating ear file in WLI

    Hi friends
    I was trying to create an ear file out of my process definitions and deploy on weblogic instead of deploying it from Workshop. I heard that there are ANT tasks available that do this but I couldn't find much detail.
    I was wondering if somebody can point me to any documentation or anything that'll help me achieve this.
    Thanks.
    Bijan

    This may help

  • Meta migration ant task throw exception

    Hi,
    I am trying the migration from kodo 2 to 3.
    I successfully migrated the properties file using the integrated ant
    task; but run into some problem with the meta data migration (the *.jdo
    files). following is the ant task I am using:
    <target name="migrate-meta" depends="init, prepare-jdo-meta, compile" >
    <!-- define the kodo2migrator task; this can be done at the top
    of -->
    <!-- the build.xml file, so it will be available for all
    targets -->
    <taskdef name="kodo2migrator"
    classname="kodo.jdbc.ant.Kodo2MigratorTask">
    <classpath>
    <pathelement
    path="${java.class.path}:${project.classpath}:${project.build.jdometa.dtd}"/>
    </classpath>
    </taskdef>
    <!-- invoke migrator on all .jdo files below the src directory -->
    <kodo2migrator>
    <classpath>
    <pathelement
    path="${java.class.path}:${project.classpath}:${project.build.jdometa.dtd}"/>
    </classpath>
    <fileset dir="${project.kodo.src}">
    <include name="**/*.jdo" />
    </fileset>
    <config properties="${jdo.properties}" />
    </kodo2migrator>
    </target>
    the exception it is throwning is :
    [kodo2migrator] kodo.jdbc.migration.kodo2.util.FatalUserException: The
    specified driver class "null" is neither a java.sql.Driver nor a
    javax.sql.DataSource. Please specify a valid driver in the
    javax.jdo.option.ConnectionDriverName property.
    [kodo2migrator] at
    kodo.jdbc.migration.kodo2.schema.ConfigurationConnector.createConnectionFactory(ConfigurationConnector.java:108)
    [kodo2migrator] at
    kodo.jdbc.migration.kodo2.schema.ConfigurationConnector.<init>(ConfigurationConnector.java:65)
    [kodo2migrator] at
    kodo.jdbc.migration.kodo2.schema.ConfigurationConnector.<init>(ConfigurationConnector.java:57)
    [kodo2migrator] at
    kodo.jdbc.migration.kodo2.schema.ConfigurationConnector.<init>(ConfigurationConnector.java:37)
    [kodo2migrator] at
    kodo.jdbc.migration.kodo2.Kodo2Migrator.migrate(Kodo2Migrator.java:161)
    [kodo2migrator] at
    kodo.jdbc.migration.kodo2.Kodo2Migrator.run(Kodo2Migrator.java:1141)
    [kodo2migrator] at
    kodo.jdbc.ant.Kodo2MigratorTask.executeOn(Kodo2MigratorTask.java:53)
    [kodo2migrator] at
    com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
    [kodo2migrator] at
    org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
    [kodo2migrator] at org.apache.tools.ant.Task.perform(Task.java:341)
    [kodo2migrator] at
    org.apache.tools.ant.Target.execute(Target.java:309)
    [kodo2migrator] at
    org.apache.tools.ant.Target.performTasks(Target.java:336)
    [kodo2migrator] at
    org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    [kodo2migrator] at
    org.apache.tools.ant.Project.executeTargets(Project.java:1255)
    [kodo2migrator] at org.apache.tools.ant.Main.runBuild(Main.java:609)
    [kodo2migrator] at org.apache.tools.ant.Main.start(Main.java:196)
    [kodo2migrator] at org.apache.tools.ant.Main.main(Main.java:235)
    BUILD FAILED
    file:/home/tyang/eclipse/workspace/UMA/build.xml:208:
    kodo.jdbc.migration.kodo2.util.FatalUserException: The specified driver
    class "null" is neither a java.sql.Driver nor a javax.sql.DataSource.
    Please specify a valid driver in the
    javax.jdo.option.ConnectionDriverName property.
    the properties file I am using is like this: (just a snipet)
    javax.jdo.PersistenceManagerFactoryClass:
    kodo.jdbc.runtime.JDBCPersistenceManagerFactory
    javax.jdo.option.ConnectionDriverName: org.postgresql.Driver
    javax.jdo.option.ConnectionURL: jdbc:postgresql://127.0.0.1/cwdevdb
    javax.jdo.option.ConnectionUserName: cwdev
    javax.jdo.option.ConnectionPassword:
    javax.jdo.option.DefaultFetchBatchSize: 10
    javax.jdo.option.DefaultFetchThreshold: 30
    javax.jdo.option.IgnoreCache: true
    javax.jdo.option.NontransactionalRead: true
    javax.jdo.option.NontransactionalWrite: false
    javax.jdo.option.Optimistic: true
    javax.jdo.option.RestoreValues: false
    javax.jdo.option.RetainValues: false
    kodo.ConnectionFactoryProperties: MaxActive=20, MaxWait=5000
    kodo.ConnectionRetainMode: persistence-manager
    kodo.DataCache: true(CacheSize=10000)
    kodo.LicenseKey: xxxx-xxxx-xxxx-xxxx-xxxx
    kodo.ManagedRuntime: TransactionManagerName=java:/TransactionManager
    kodo.PersistenceManagerImpl: CloseOnManagedCommit=true
    kodo.QueryCache: true
    kodo.RemoteCommitProvider: sjvm(Topic=topic/KodoCacheTopic)
    kodo.jdbc.DBDictionary: postgres(StoreCharsAsNumbers=false)
    kodo.jdbc.SequenceFactory: PrimaryKeyColumn=PKX,
    SequenceColumn=SEQUENCEX, TableName=JDO_SEQUENCEX
    To make sure this IS the one it is using, not only I echo out the
    "${jdo.properties}" value, but also I tried to comment out the
    licenseKey line, then it threw "license key invalid" exception. so I am
    sure this is the properties file I am using in that ant task.
    Also I tried using the command line on one of our classes, it does not
    run into this problem.
    Any clue what I am missing?
    Thanks a lot,
    Tao

    The 3.0.0 migrator task has a couple of bugs. These will be ironed out
    in 3.0.1, which is due for release any day now. But if you must work
    around the bugs immediately, you'll have to:
    1. Run the task using your old properties file. Actually this will be a
    requirement even in 3.0.1; that's why in the migration chapter of the
    docs we say to migrate your metadata before your properties. The
    migration tool needs to access 2.5 properties to map your classes properly.
    2. Add the the following property to your old properties file:
    kodo.LicenseKey: <your license key>
    3. Name the properties file "kodo.properties" and place it in one of the
    directories listed in the ant task's CLASSPATH. If that doesn't work,
    place it in a directory in your system CLASSPATH. The 3.0.0 task has
    some classpath problems, and also the <config> task element doesn't work.
    Or, you could just set your system CLASSPATH and run the kodo2migrator
    tool from the command line.
    I hope this helps. As I said, 3.0.1 resolves these ant problems, and
    will be released very shortly.

  • 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 B3 Ant task fails to run Air-based tests

    Folks,
    I am using FlexUnit4.1 Beta 3 and am seeing the <flexunit> Ant task fail when running tests that use the Air libraries. The project in question used to test just fine with version 4.0 earlier this year, but I just dusted it off after a branch change and tried re-running with 4.1and started seeing the failure.Here is the relevant console output:
    [com.djte.library:flexunit] Validating task attributes ...
    [com.djte.library:flexunit] Generating default values ...
    [com.djte.library:flexunit] Using default working dir [C:\EclipseWorkspace3.5\report.renderer_tests_2\Source\Flex]
    [com.djte.library:flexunit] Using the following settings for the test run:
    [com.djte.library:flexunit]     FLEX_HOME: [C:\iFABS_DE\dev\vert-d3flxcmn24\204100.32.0.20100926233508_d3flxcmn24]
    [com.djte.library:flexunit]     haltonfailure: [false]
    [com.djte.library:flexunit]     headless: [false]
    [com.djte.library:flexunit]     display: [99]
    [com.djte.library:flexunit]     localTrusted: [true]
    [com.djte.library:flexunit]     player: [air]
    [com.djte.library:flexunit]     port: [1024]
    [com.djte.library:flexunit]     swf: [C:\EclipseWorkspace3.5\report.renderer_tests_2\build\report.renderer.tests.unit.swf]
    [com.djte.library:flexunit]     timeout: [1800000ms]
    [com.djte.library:flexunit]     toDir: [C:\EclipseWorkspace3.5\report.renderer_tests_2\build\reports\xml]
    [com.djte.library:flexunit] Setting up server process ...
    [com.djte.library:flexunit] Starting server ...
    [com.djte.library:flexunit] OS: [Windows]
    [com.djte.library:flexunit] Opening server socket on port [1024].
    [com.djte.library:flexunit] Waiting for client connection ...
    [com.djte.library:flexunit] Launching player:
    [com.djte.library:flexunit] Found AIR version: 1.5
    BUILD FAILED
    C:\public\JavaTools\DJTE\latest\DjteLibrary\library.xml:57: The following error occurred while executing this line:
    : Error launching the test runner.
    The error message is not very specific... The last output seen before the failure is "Found AIR version: 1.5". This makes me wonder if the problem is related to how I have Air installed on my Windows XP machine. Come to think of it, I am not sure exactly how the host machine should be configured to run FlexUnit tests that require Air.  Do I really need Air to be installed?  I have Air 2.0.3.13070 installed, but the <flexunit> task thinks it found version 1.5 - hmmm...  I also have the debug Flash 10 player, and SWF appplications are configued to run using this player. Flex tests run fine, just not Air tests.  What am I missing?
    I see that 4.1 RC1 is now out, so I will grab that and give it a try.
    If anyone who tests air more often has any advice - I am all ears!
    Thanks,
    Trevor

    Thanks for your responses, Brian!
    Yes, I think I see the immediate problem.  The problem is that there is no Air runtime in our customized Flex SDK (based on 3.2), even though it appears to have the Air compile libraries. I had been attempting to use this custom SDK to run FlexUnit with, and I think that needs to change.
    Why was I doing this?
    Well, I had tripped over some problems with 4.1 earlier on when I attempted to run it without having FLEX_HOME set in the environment. So, now I have been setting FLEX_HOME programmatically in my code before calling the <flexunit> task. And I had figured that it would be a good idea to set FLEX_HOME to the same SDK that the tests had been built with, i.e. our customized one.  Now I am thinking that this is not necessary, since our end users will never have access to this SDK. I now think that I should be able to install a new stock Adobe Flex SDK on my CI server, install the Air runtime into it, and then use that location when I set FLEX_HOME.  Is that how others are doing it?  If anyone could validate this approach, I would be grateful.
    One question that arises in my mind now: How does the Air runtime get into the Flex SDK? I have installed the Air runtime using the installer from Adobe some time ago, so I am not quite sure what all that did.  I assume the  Air installer finds all the Flex SDKs on your machine and inserts the runtime in each location appropriately? Again, pardon my ignorance...
    I have just tried out the above idea, i.e. setting FLEX_HOME to a different SDK that has Air runtime, and the <flexunit> task worked when I ran it!  An Air window opened, the tests ran, and reports were generated. So, it would appear my problem is solved! Cool beans!
    Brian, you made some comments about another possible issue with the "custom app descriptor".  I am not sure if that applies to me or not.  How would I know whether or not we need that support?  Again, I know it would help if I was the developer who had actually written the Flex tests, but I am not...
    Anyway, I hope this thread helps other folks who are having similar issues.  I am going to reinstall a fresh Adobe SDK and the Air installer on a clean machine next, and see if the tests will run there.
    Before ending this thread, I do want to point out that the ant task might have need of improvement in the case in which the user attempts to run the air "player" but the Air runtime is not setup in the SDK. On Windows, the ant process simply hung at this point, apparently thinking that the launch of the player had been successful, but in reality, the message about the air runtime being not found had occurred. It might be nice if it exited gracefully with a warning message instead of hanging. Just a suggestion...
    Brian, as always, thanks again for your help with this issue.You guys are doing a great job with this project. Please keep it up!
    Thanks,
    Trevor

  • Flexunit ant task on CI Server - rundll32.exe causing problems

    My team is using flexunit and a CI server running Hudson. On a development system, everything runs fine, and we get the reports just like we need them. It also works fine on the CI server when just the flexunit task is run, but the build fails when the CI server tries to run a full build - the build tries to run the tests and clean to prepare for the next build, but the clean fails because there is a "rundll32.exe" process using one of the files and it can't be deleted. We tracked this process down to the one run by the flexunit task.
    Our task is:
        <target name="xci-test" depends="set-flex-coverage-home, prepare-domain-metadata-to-war, prepare-sounds-to-war, prepare-domain-metadata-for-testing, compile-unit-test-flex">
            <echo>**** The flexunit target requires that you have the standalone flash player installed and configured to run .swf files automatically! ****</echo>
            <mkdir dir="${dir.flexgui.test.output}"/>
        <!-- Execute TestRunner.swf as FlexUnit tests and publish reports -->
        <!-- Please see http://docs.flexunit.org/index.php?title=Ant_Task -->
        <flexunit workingDir="${dir.flexgui.test.output}"   
                  swf="${dir.flexgui.build.war}/${flex.swf.name}test.swf"
                  toDir="${dir.flexgui.test.output}"
                  haltonfailure="false" verbose="true" localTrusted="true"
                                port="11028" timeout="40000"/>
            <!-- Generate readable JUnit-style reports -->
            <junitreport todir="${dir.flexgui.test.output}">
                <fileset dir="${dir.flexgui.test.output}">
                    <include name="TEST-*.xml"/>
                </fileset>
                <report format="frames" todir="${dir.flexgui.test.output}/"/>
            </junitreport>
            <sleep seconds="10"/>
        </target>
    I can reproduce this behavior on my dev machine by running "ant xci-test clean". We tried putting a sleep in to give the process time to shut down, no change. We attempted to use the 'command' option to the flexunit task to bypass the use of rundll32.exe, but then the flash player just hangs onto the file and the clean still fails. Since "ant xci-test" followed by "ant clean" works, we also tried running ant from within ant in order to force the process to stop, but that also didn't work. Any help on this would be greatly appreciated.
    Thanks for your time,
    Linden

    @Linden - Have not heard of this side effect from anyone as of yet, but good to know.  Sounds like the file lock is coming from the Flash Player and causing the spawning process (rundll32.exe) to hang around as well.  The FlexUnit team runs on Hudson using the FlexUnit Ant task, but we don't seem to encounter the same issue.  What's the longest interval you've tried to use with the sleep task?  Does the FP ever release its handle to the test SWF on your development machines?
    Not sure this is a problem with the FlexUnit Ant task, but in 4.2 we could try to explicitly kill the rundll32 process since we'll have the PID when the task launches it.  Head on over to JIRA and file a feature request for us and I'll see what I can do in the new year.  In the short term though, maybe try upgrading your version of the stand alone debug flash player to see if that helps.  Has anyone else seen this issue?  Could you possible just move the clean target to be called before the xci-test target is run?  Just some suggestions.
    -Brian

  • FlexUnit Ant task freeze at Reciving Data...

    Hello,
    I'm trying to use flex unit task and when I run it, get this on console and stay there for ever.
    "*****" is just to privacy
    this is my ant task
    <target name="UNIT TEST">
                        <echo>COMPILING TEST SWF..</echo>
                        <mxmlc output="${basedir}/bin/Test.swf" file="${basedir}/test-src/TestRunner.as">
                                  <target-player>${env.TARGET_PLAYER}</target-player>
                                  <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
                                  <source-path path-element="${FLEX_HOME}/frameworks"/>
                                  <compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
                           <include name="libs" />
                    <include name="../bundles/{locale}" />
                        </compiler.library-path>       
                                  <source-path path-element="${env.WIP_CLIENT_COM_SRC_PATH}"/>
                                  <define name="CONFIG::FLASH_AUTHORING" value="false"/>
                                  <source-path path-element="${basedir}/test-src"/>
                                  <source-path path-element="${basedir}/src"/>
                                  <compiler.library-path dir="${basedir}" append="true">
                                 <include name="libs" />
                              </compiler.library-path>  
                                  <compiler.library-path dir="${env.WIP_CLIENT_COM_SRC_PATH}" append="true">
                                 <include name="libs" />
                              </compiler.library-path>  
                                  <compiler.external-library-path dir="${env.WIP_CLIENT_COM_SRC_PATH}/libs" append="true">
                                            <include name="GenericChat.swc"/>
                                  </compiler.external-library-path>
                         </mxmlc>
                        <echo>COMPILED TEST SWF..</echo>
                        <echo>Running Test Runner SWF</echo>
            <flexunit swf="${basedir}\bin\Test.swf"
                toDir="${basedir}\bin"
                haltonfailure="true"
                verbose="true"
                localTrusted="false"/>
            <echo>Ran Test Runner SWF</echo>
            <echo>Generate Readable Tests</echo>
            <junitreport todir="${basedir}\bin">
                <fileset dir="${basedir}\bin">
                    <include name="TEST-*.xml"/>
                </fileset>
                <report format="frames" todir="${basedir}\bin\html"/>
            </junitreport>
            <echo>Generated Readable Tests</echo>
              </target>
    Buildfile:******.xml
    UNIT TEST:
         [echo] COMPILING TEST SWF..
        [mxmlc] Cargando el archivo de configuración D:\Desarrollo\fdk\flex_sdk_4.5.1.21328\frameworks\flex-config.xml
        [mxmlc] D:\Proyectos\Bubble\Cliente\trunk\test-src\TestRunner.as: Advertencia: Esta unidad de compilación no tiene ninguna factoryClass especificada en los metadatos del fotograma para cargar las bibliotecas compartidas en tiempo de ejecución configuradas. Para compilar sin bibliotecas compartidas en tiempo de ejecución establezca la opción -static-link-runtime-shared-libraries en true o elimine la opción -runtime-shared-libraries.
        [mxmlc] *********Test.swf (50729 bytes)
         [echo] COMPILED TEST SWF..
         [echo] Running Test Runner SWF
    [flexunit] Validating task attributes ...
    [flexunit] Generating default values ...
    [flexunit] Using default working dir [****]
    [flexunit] Using the following settings for the test run:
    [flexunit]           FLEX_HOME: [*****fdk\flex_sdk_4.5.1.21328]
    [flexunit]           haltonfailure: [true]
    [flexunit]           headless: [false]
    [flexunit]           display: [99]
    [flexunit]           localTrusted: [false]
    [flexunit]           player: [flash]
    [flexunit]           port: [1024]
    [flexunit]           swf: [****\Test.swf]
    [flexunit]           timeout: [60000ms]
    [flexunit]           toDir: [********\bin]
    [flexunit] Setting up server process ...
    [flexunit] Starting server ...
    [flexunit] Opening server socket on port [1024].
    [flexunit] Waiting for client connection ...
    [flexunit] Executing 'rundll32' with arguments:
    [flexunit] 'url.dll,FileProtocolHandler'
    [flexunit] '********\Test.swf'
    [flexunit] The ' characters around the executable and arguments are
    [flexunit] not part of the command.
    [flexunit] Client connected.
    [flexunit] Setting inbound buffer size to [262144] bytes.
    [flexunit] Receiving data ...
    Thank you in advance.
    Javier

    I still have not been able to get FlexUnit running with AIR SDK 15. But I found a workaround:
    Compile the source code with SDK 15 into swc files.
    Set FlexUnit to use SDK 4.
    Do not include source code in the FlexUnit Ant task.
    Include the swc files in stead by adding another library dir parameter to the flexunit call.

  • Passing extra compiler options to flexunit ANT task?

    Hi,
    Is there a way to send any extra compiler options to the <flexunit> ANT task?
    I'm using conditional compilation and compilation (mxmlc) is failing from the <flexunit> task:
    "Error: Access of undefined property DEBUG.
    CONFIG::DEBUG {"
    I tried sneaking "-define+=CONFIG::DEBUG,false" in with one of the other compiler options you can set on the <flexunit> task, but that just doesn't work or results in a validation error like this:
    "One of the directories specified as a 'testSource' element does not exist."
    Let me know if this is possible at all.
    Thanks,
    Wijnand

    Hi Brian,
    legrosb wrote:
    @Wijnand - Sorry for the belated response.
    Not late at all! I think a response within a day on a forum is quite fast!
    legrosb wrote:
    I thought I had captured this on the wiki, but it looks like I haven't, so thank you for the heads up.
    I'll also update the wiki @ http://docs.flexunit.org/index.php?title=Ant_Task to be more detailed regarding compilation so other don't have to dig. 
    Did you just do an update on that Wiki page or did I completely miss the part that explained the <flexunit> parameters?
    legrosb wrote:
    In 4.2, which is super pre-alpha right now, I've added support to accept a series of flex-config.xml files provided by the user.  Not sure if conditional compilation can be tackled with a custom flex-config.xml file, but if so then that'd be the feature that may help you.
    Yes, being able to add (+=) a custom config file will solve this problem for me. You can define properties and values like this:
    <flex-config>
        <compiler>
            <define>
                <name>CONFIG::DEBUG</name>
                <value>false</value>
            </define>
        </compiler>
    <flex-config>
    So in your AS code you can use:
    CONFIG::DEBUG {
        // Do something that only should be done in debug mode.
    I have another question, I ran into this one during testing my SWF with flexunit.
    unittest.xml:82: java.util.concurrent.ExecutionException: command [<testcase classname='com.tuenti.video.unittest.testcase.player::MockPlayerCase' name='loadPlayer' time='0.000'  status='success'/>] not understood
    I had a look at the FlexUnitSocketThread.parseInboundMessages method that throws this error and it looks like that your defined END_OF_SUCCESS doesn't entirely match what the SWF is spitting out. They are of by 1 space: END_OF_SUCCESS is defined as: "status=\"success\" />", whereas my SWF spits out the following: "status='success'/>" (single quotes and no space before the closing of the tag).
    It looks like I'm not the only one with the ExecutionException as it is reported on StackOverflow as well: http://stackoverflow.com/questions/3953677/flexunittasks-error-of-command-not-understood
    Cheers,
    Wijnand

  • 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

  • Is it possible to run the flexunit ant task without prompting the browser or anything?

    Every time I run the task the browser prompts out and ask me to unblock the generated "TestRunner.swf", only after which the build continues. I only need the test reports and I don't want to be interupted during the build. What can I do to hide the player behind the scene? Thanks very much.

    @sotestspacetimeriskind - Ideally I'd suggest using the stand-alone (projector) debug flash player rather than a browser to run the tests unless you have a need to use the browser; sounds like you're using IE on Windows currently.  You can find the latest SA Debug FP for Windows @  http://download.macromedia.com/pub/flashplayer/updaters/10/flashplayer_10_sa_debug.exe.  After it's installed, you need to associate files with the SWF extension to be opened by the FP application.  On Windows you can do this by right-clicking on a SWF file and selecting "Open With..." from the context menu, then selecting the FP executable just installed, then selecting the check box on the file dialog choosing to open all future files with the application.  If you require the browser to run your tests due to features only found in Flex running in the browser, I'd suggest using a browser other than IE and the latest FlexUnit 4.1 binaries with the command property (see http://github.com/blegros/flexunit/blob/master/FlexUnit4SampleCIProject/build.custom.xml for an example and http://docs.flexunit.org/index.php?title=Ant_Task).
    If you're having trouble implementing the above, post your build script and environment specs and we'll try to help you out further.
    -Brian

Maybe you are looking for

  • Itunes 10.6 and iOS 5.1 the devices were no more recognized by itunes

    Since I updated to itunes 10.6 and iOS 5.1 the devices were no more recognized by itunes (only be Win7 64bit) and the itunes 10.6 diagnose crashes the the programme

  • IPod freezes after connecting to PC/iTunes

    I think it's a common problem that iPods freeze after plugging in the USB cable. I don't know if it's working for others, but if i do a reset (hold menu plus select) on the iPod while it is plugged and iTunes is running it works. But i have to do thi

  • How do I create such an effect in Photoshop CS6?

    Hi All, I am not a big expert in Photoshop, but I know how to use it. I hope I have chosen the correct community for this question. I want to create a design similar to something I have found in the internet. I have an image with a white background a

  • EZDrummer Velocity Sweep Automation?

    Anyone who has ezdrummer probably loves that velocity sweep knob. i haven't spent too much time on it yet, but in 15 minutes i couldn't figure out how to emulate that velocity sweep with automation after i put it's midi files into the arrange window.

  • Financial Reporting Related Content Link

    Hi, i developed some Financial Reporting reports using 9.3.1 version. I've used the Related Content feature in order to obtain a link from a report to another. The problem is due to the fact that the new report linked to the related content opens in