Simple Unit Testing in Appcelerator Titanium Alloy
Upcoming SlideShare
Loading in...5
×
 

Simple Unit Testing in Appcelerator Titanium Alloy

on

  • 6,804 views

Simple Unit Testing in Appcelerator Titanium Alloy using behave.js and the new titanium CLI for running the scripts

Simple Unit Testing in Appcelerator Titanium Alloy using behave.js and the new titanium CLI for running the scripts

Statistics

Views

Total Views
6,804
Views on SlideShare
6,666
Embed Views
138

Actions

Likes
6
Downloads
48
Comments
2

2 Embeds 138

https://twitter.com 108
http://www.twylah.com 30

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • I got it to run. However, because Studio 3.1.x has a bug where the debug info is only displayed if the app is run in debug mode, I can't see the result output. Any alternative to console output?
    Are you sure you want to
    Your message goes here
    Processing…
  • For some reason the --deploy-type test was having no effect for me so I had to remove the 'if' statement in index.js in order to get the test to run. Using Titanium v3.1.2
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Simple Unit Testing in Appcelerator Titanium Alloy Simple Unit Testing in Appcelerator Titanium Alloy Presentation Transcript

  • Simple Unit Testing in Titanium Alloy Aaron K. Saunders CEO Clearly Innovative Inc @aaronksaunders
  • First Thing… "•  Why Does Testing Even Matter? •  Find the bugs earlier and more often •  The automation of running the scripts help to ensure code changes don’t break things. •  Easier way of testing functionality
  • Setup behave.js"   Create new “lib” folder in project if it does not exists"   Create a new file in that folder called “behave.js”"   Add the contents of this URL to the new file "   http://bit.ly/11IAjXB
  • Setup Your Test Spec"   Create a new folder in assests called “specs”"   Create a new file called “test-spec-1.js”"   Add this to the file
  • Setup Your index.js"   Add this code to index.js to run the test based on the deploy-type property
  • Run the Titanium CLItitanium build --platform ios --deploy-type test See Appcelerator documentation for more"  information "   http://docs.appcelerator.com/titanium/3.0/#!/ guide/Titanium_Command- Line_Interface_Reference
  • References"   CODESTRONG REPO "   https://github.com/appcelerator/ Codestrong/tree/master/app/assets/spec "   https://github.com/appcelerator/ Codestrong/blob/master/app/lib/behave.js"   This posting explained a more complex approach IMHO "   https://github.com/denvers/unit-test- titanium-alloy-project
  • More Information Aaron K. Saunders Clearly Innovative Inc aaron@clearlyinnovative.com @aaronksaundershttp://blog.clearlyinnovative.com