appcelerator/alloy — pull request #8 by kwhinnery (2012-06-16 07:19:04+00:00)
Title: Adding a test harness for the sample/test apps, and introducing Jake

## Introducing Jake

Jake is a build tool similar to Ruby's make. It's really handy for build tasks in node projects. I used it to drive the test harness, but it can be used for anything you'd use rake, make, ant or whatever on. Pretty standard in node.js projects.

## Test harness

There's no scripted means of running the sample apps right now - I assume for test you're manually copying files around so far? I created some build tools to automate the installation and running of the sample apps in a Titanium Mobile project called "Harness" inside the `test` directory. You can copy over the sample apps using `jake app:setup dir=` and that will clobber the old app and copy over the new one.

To actually run the app, you have two options. Configure an environment variable pointing to the Titanium Mobile SDK, like so:

export TITANIUM_MOBILE_SDK=/Users/kwhinnery/Library/Application\ Support/Titanium/mobilesdk/osx/2.0.2.GA

and then, you can copy over and run the sample app all from the command line (for iOS and Android, though fastdev isn't working yet). Works nice for fast iterations on iOS. This is done via:

jake app:run dir=simple platform=iphone

To run via Studio, you just need to copy over the Alloy app you want to test via:

jake app:setup dir=simple

Then import the "Harness" app into Studio, and run as normal from there. Saves some manual file copying and starts us down the road to more formal testing. Hope this helps...