Upgrade to Pro — share decks privately, control downloads, hide ads and more …

RubyMotion #inspect2013, Behavior-Driver Motion...

RubyMotion #inspect2013, Behavior-Driver Motion Using Calabash

This talk + demo shows how to do BDD-style acceptance testing of RubyMotion apps using Calabash iOS and motion-calabash

Karl Krukow

March 28, 2013
Tweet

Other Decks in Programming

Transcript

  1. Who’s this guy? • Co-founder of a mobile test automation

    start-up • Engineer at Trifork 2006-2012, iOS, JavaScript, Ruby, Java • Father of one • Clojure and Rich Hickey FanBoi • Co-maintainer of Calabash torsdag den 4. april 13
  2. This Talk (is mostly a demo) • Brief intro to

    BBD-style acceptance testing with Calabash • Live Demo: Testing a RubyMotion app • Easy Install, Scaffold and Run using ‘motion-calabash’ gem • More complex test + running on devices • Q & A torsdag den 4. april 13
  3. Our Acceptance Testing Philosophy • “Behaviour-driven development is about implementing

    an application by describing its behaviour from the perspective of its stakeholders” - Dan North • “Outside-in” • Business-readable specfications - shared language • Can be used to drive automated acceptance tests torsdag den 4. april 13
  4. Feature: Login As a user I'll be able to log

    in and manage my WordPress blogs. Scenario: Invalid login Given I am about to login When I enter invalid credentials Then I am presented with an error stating to try again Scenario: Login with wordpres.com credentials ... Example torsdag den 4. april 13
  5. • Tool for cross-platform BDD-style acceptance testing. • Calabash Android:

    https://github.com/calabash/calabash-android • Calabash iOS: https://github.com/calabash/calabash-ios • Managed by LessPainful, but Open-Source, Open to contribution and Free (Eclipse Public License) • Written in Objective C, Java and Ruby (and Clojure) • Test written in Ruby but other languages are easy to add. torsdag den 4. april 13
  6. JSON over HTTP Your App Calabash Server Calabash Clients Calabash

    Android Calabash iOS Calabash JVM High-level Architecture ... Device, Emulator or Simulator Host computer torsdag den 4. april 13
  7. Calabash Features for RubyMotion Users • Native and hybrid Motion

    apps (and Android too!) • BDD via the Cucumber tool • Full support for running on physical devices as well as simulators. • RubyMotion integration: require ‘motion-calabash’ • Value-added options via LessPainful • training, support, device labs torsdag den 4. april 13
  8. Demo • Rest of this talk will be live demo

    and Q&A :) • https://github.com/krukow/motion-calabash-inspect2013 • Demo using the RM sample app: ‘Beers’ app • Open source and simple • Hybrid app (some content displayed in web views) • Backend server (wikipedia) • Gestures like pinch, tap, etc... torsdag den 4. april 13
  9. REFERENCES • https://github.com/calabash • https://github.com/calabash/calabash-ios • https://github.com/calabash/calabash-ios/wiki • https://github.com/calabash/calabash-ios-server •

    https://github.com/calabash/calabash-android • http://blog.lesspainful.com/ • https://www.lesspainful.com/ torsdag den 4. april 13