0 Replies Latest reply: Aug 18, 2010 6:08 PM by DougBanks RSS

    Running FlexUnit tests from command line

    DougBanks

      Sorry if that has been posted before: I searched best I could and nothing came up.

       

      I am interested in building and running my unit tests from the command line so we can add it to a nightly build process.

       

      I am *very* new to all this: basically I picked up Adobe Flash Builder 4 a month ago and I have done *everything* inside that IDE: writing code, building, testing, running.

       

      I looked into at least how to build something from the command line, I found this:

      http://help.adobe.com/en_US/flashbuilder/using/WSbde04e3d3e6474c4-59108b2e1215eb9d5e4-8000 .html

      Can't get past this error:

      Buildfile: /Users/dbanks/build_test.xml

       

      BUILD FAILED
      Target "FlexUnitApplication" does not exist in the project "null".

       

      Total time: 0 seconds
      Adobe Flash Builder 4:
      An error has occurred. See the log file
      /Users/dbanks/Documents/Adobe Flash Builder 4/.metadata/.log.

       

      Plus, even if I got this going, I am just building the swf.  I also want to run it and capture the output in some meaningful way that can be read/evaluated/acted on.

       

      FWIW, the script/xml I am using to try to build:


      build_test.xml:

      <?xml version="1.0"?>
      <project default="main">
          <target name="main">
              <fb.exportReleaseBuild project="NightclubMogul" />
          </target>
      </project>

       

      execute_build_test.sh:

      WORKSPACE="$HOME/Documents/AdobeFlashBuilder4"

      # works with either FlashBuilder.app or Eclipse.app
      "/Applications/AdobeFlashBuilder4" \
          --launcher.suppressErrors   \
          -noSplash   \
          -application org.eclipse.ant.core.antRunner   \
          -data "$WORKSPACE"    \
          -file "/Users/dbanks/build_test.xml" FlexUnitApplication

       

       

      I am not clear what in here is actually supposed to point to where my project lives: it's off in some directory somewhere.  I see that I am pointing to a workspace (Documents/AdobeFlashBuilder4) but when I poke around in there I don't see anything connecting back to the directories where the code lives.

       

      Any help would be great: getting the tests to build from command line, then getting them to run.