Working With The Source

flashquartermaster edited this page Mar 12, 2012 · 9 revisions

Build Notes

  • When running the build you will need to make a couple of changes
  • Set the correct FLEX_HOME path in all the build properties files (There is a specific properties file for each project)
  • Set the correct path for CUCUMBER_NIX for *nix or CUCUMBER_EXE for windows, in the main file in the project parent directory
  • If you are on a *nix system set NIX_FILE_EXT to the correct file extension (dmg or deb) in the main file (Please Note: Red hat have changed their RPM build API and ADT will no longer build rpm's)
  • Set the correct paths and path separators for your system in test/features/support/

How to change and test the core library code using self test feature files

This information is purely for working with this code base. For working with your own projects see How to use Cuke4AS3 Developer or look at the Cuke4AS3 project README.

  • Build your code changes, swf and app descriptor using ant -f cuke4as3-build.xml test-new-code-changes
  • Please Note: In the ant script you will notice that the compiler library path references the new Cuke4AS3.swc which is essential to run the new code. If you use the Developer UI you will need to enter the same info into the 'Additional Mxmlc Args' field.
  • You may wish to edit the target to just test your new changes e.g. alter the cucumber arguments to target a particular tag such as @wire_server
  • Note: Make sure you quit the running version of you app between tests or you will have locked the port that Cuke4AS3 is listening on and end up with a #2002 server error. If you are not doing a test on the Cuke4AS3 Class (@core) then uncomment the headless switch to get the app to automatically quit at the end of the target run
  • If necessary do a full regression test using ant -f cuke4as3-build.xml cucumber-self-test

Unit testing your new code:

  • Compile your code changes using ant -f cuke4as3-build.xml compile-swc
  • Edit the test/TestRunner.mxml if you just want to run certain tests
  • Run your unit tests ant -f cuke4as3-build.xml unittest

If you are working with the Developer UI mxml only and not the core library

  • Use ant -f developerui-build.xml manual-test to test your new code
  • Use ant -f developerui-build.xml create-installer in the Developer UI project folder to create a new version to install with your new code
  • If the version number has not changed uninstall your existing Cuke4AS3 Developer UI and install the newly created application (This is to avoid getting errors from the air installer)

If you are working with cucumber.yml profiles:

  • You will need to put a profile in the root of the project you are working with. So most likely you will need one in the DeveloperUI root and one in the Cuke4AS3 root. Please remember that for production purposes your cucumber.yml will need to be in the system root. See Known Issues