SlideShare a Scribd company logo
1 of 24
Download to read offline
iOS Automated Testing with
  Calabash: Tips and Tricks
                 Moncef Belyamani
                   @monfresh




     Mobile Testing Summit / November 1, 2012 / San Francisco
iPhone Apps




iPad Apps
AUTOMATION TOOL
                 CHECKLIST
•   Easy to set up and maintain

•   Updated regularly

•   Well-documented

•   Supports iOS and Android

•   Runs on devices untethered

•   Readable tests
TOOLS EVALUATED
•   Anteater

•   Calabash

•   FoneMonkey (before it became MonkeyTalk)

•   Frank

•   KIF

•   TouchTest

•   UI Automation

•   Zucchini
AND THE WINNER IS...
RECOMMENDED SETUP

•   Ruby 1.9.3

•   RVM

•   Gemset

•   How to install Xcode, Homebrew, Git, RVM, & Ruby 1.9.3 on
    Snow Leopard, Lion, and Mountain Lion

•   Enhance your Ruby development with RVM gemsets and .rvmrc
CALABASH TEST


FEATURE FILE + STEP DEFINITION
FEATURE EXAMPLE

Feature: Comments
  In order to contribute to the discussion
  As a Hacker News reader
  I want to be able to add a comment

Scenario: User not logged in
  Given I am not logged in
  When I go to comment on a submission
  Then I should be prompted to log in
DON’T DO THIS

Scenario: User logged in, but cancels comment form
  Given the app is running
   When I touch "Profile"
   Then I wait to see "Login"
   Then I fill in “Username” with "my_username"
   Then I touch “Password”
   Then I fill in “Password” with "my_password"
   Then I touch done
   Then I wait to see "Logout"
   Then I touch "Home"
   Then I touch list item number 1
   Then I touch "reply"
   Then I touch "Cancel"
   Then I should see "Submission"
DO THIS

Scenario: User logged in, but cancels comment form
  Given I am logged in as “username”
  When I go to comment on a submission
  But I cancel the comment form
  Then I should see the submission
  And a comment from "username" should not appear
STEP DEFINITION

Given /^I am logged in as "([^"]*)"$/ do |username|
  macro 'I touch "Profile"'
  if element_exists("button marked:'Logout'")
    sleep(1)
  else
  macro %Q[I fill in “Username” with "#{username}"]
  macro 'I touch “Password”'
  macro 'I fill in “Password” with "my_password"'
  macro 'I touch done'
  macro 'I wait to see "Logout"'
  end
end
UPDATING IS EASY, BUT...

•   gem update calabash-cucumber

•   calabash-ios download   (not with SVN)

•   curl http://localhost:37265/version      (to verify framework is
    up to date)

•   May need to “Reset Content and Settings” in Simulator

•   When new files are added, update Target Membership
KEEP IN MIND


Swiping depends on device orientation

Can only touch visible items
TIPS & TRICKS
Use .bash_profile aliases

self.myButton.accessibilityElementsHidden = YES;

Use console to experiment and “query” to find elements

Participate in the Google Group

Get commit notifications with GitHub for Mac
RECOMMENDATIONS
•   Full-time Automation Engineer

•   Work with Dev to make apps accessible

•   Continuous Integration

•   Contribute fixes and custom steps
REFERENCES
•   iOS Automated Testing with Calabash, Cucumber, and Ruby

•   Create aliases in .bash_profile to assign shortcuts for common
    Terminal commands

•   A Calabash custom step to Swipe to delete all cells in a Table View

•   Code for America

•   AOL Mobile
Moncef Belyamani
    @monfresh
moncef@monfresh.com
moncefbelyamani.com
  about.me/moncef
QUESTIONS?
THANK YOU!

More Related Content

What's hot

Eye candy for your iPhone
Eye candy for your iPhoneEye candy for your iPhone
Eye candy for your iPhoneBrian Shim
 
Open Source Automation Tools That Really Work V2
Open Source Automation Tools That Really Work V2Open Source Automation Tools That Really Work V2
Open Source Automation Tools That Really Work V2An Doan
 
Dnn connect dnnmobi-slides
Dnn connect dnnmobi-slidesDnn connect dnnmobi-slides
Dnn connect dnnmobi-slidesashishpd
 
Building Browser Extensions with Ember
Building Browser Extensions with EmberBuilding Browser Extensions with Ember
Building Browser Extensions with EmberAlex Blom
 
I, For One, Welcome Our New Robot Overlords
I, For One, Welcome Our New Robot OverlordsI, For One, Welcome Our New Robot Overlords
I, For One, Welcome Our New Robot OverlordsSteve Malsam
 
The Platform Era, Software and APIs in the organization change
The Platform Era, Software and APIs in the organization changeThe Platform Era, Software and APIs in the organization change
The Platform Era, Software and APIs in the organization changebootis
 
React For Vikings
React For VikingsReact For Vikings
React For VikingsFITC
 
Mobile Cross Platform Automation in-practice and on a Large Scale
Mobile Cross Platform Automation in-practice and on a Large ScaleMobile Cross Platform Automation in-practice and on a Large Scale
Mobile Cross Platform Automation in-practice and on a Large ScaleSathish Gogineni
 
Mistakes I Made Building Netflix for the iPhone
Mistakes I Made Building Netflix for the iPhoneMistakes I Made Building Netflix for the iPhone
Mistakes I Made Building Netflix for the iPhonekentbrew
 
Immutability: from code to infrastructure, the way to scalability - Breizhca...
 Immutability: from code to infrastructure, the way to scalability - Breizhca... Immutability: from code to infrastructure, the way to scalability - Breizhca...
Immutability: from code to infrastructure, the way to scalability - Breizhca...Quentin Adam
 
Prototyping web apps with Wordpress
Prototyping web apps with WordpressPrototyping web apps with Wordpress
Prototyping web apps with WordpressZeeen
 
DNN Web API For Mobile
DNN Web API For MobileDNN Web API For Mobile
DNN Web API For Mobileashishpd
 
Building Hybrid Apps with Ember
Building Hybrid Apps with EmberBuilding Hybrid Apps with Ember
Building Hybrid Apps with Emberjakecraige
 
WordCamp SF 2011: Debugging in WordPress
WordCamp SF 2011: Debugging in WordPressWordCamp SF 2011: Debugging in WordPress
WordCamp SF 2011: Debugging in WordPressandrewnacin
 
Enterprising JavaFX
Enterprising JavaFXEnterprising JavaFX
Enterprising JavaFXRichard Bair
 

What's hot (19)

Eye candy for your iPhone
Eye candy for your iPhoneEye candy for your iPhone
Eye candy for your iPhone
 
Open Source Automation Tools That Really Work V2
Open Source Automation Tools That Really Work V2Open Source Automation Tools That Really Work V2
Open Source Automation Tools That Really Work V2
 
Dnn connect dnnmobi-slides
Dnn connect dnnmobi-slidesDnn connect dnnmobi-slides
Dnn connect dnnmobi-slides
 
Building Browser Extensions with Ember
Building Browser Extensions with EmberBuilding Browser Extensions with Ember
Building Browser Extensions with Ember
 
I, For One, Welcome Our New Robot Overlords
I, For One, Welcome Our New Robot OverlordsI, For One, Welcome Our New Robot Overlords
I, For One, Welcome Our New Robot Overlords
 
The Platform Era, Software and APIs in the organization change
The Platform Era, Software and APIs in the organization changeThe Platform Era, Software and APIs in the organization change
The Platform Era, Software and APIs in the organization change
 
How I got my First CVE
How I got my First CVE How I got my First CVE
How I got my First CVE
 
React For Vikings
React For VikingsReact For Vikings
React For Vikings
 
monkeyTalk
monkeyTalkmonkeyTalk
monkeyTalk
 
Mobile Cross Platform Automation in-practice and on a Large Scale
Mobile Cross Platform Automation in-practice and on a Large ScaleMobile Cross Platform Automation in-practice and on a Large Scale
Mobile Cross Platform Automation in-practice and on a Large Scale
 
Mistakes I Made Building Netflix for the iPhone
Mistakes I Made Building Netflix for the iPhoneMistakes I Made Building Netflix for the iPhone
Mistakes I Made Building Netflix for the iPhone
 
Immutability: from code to infrastructure, the way to scalability - Breizhca...
 Immutability: from code to infrastructure, the way to scalability - Breizhca... Immutability: from code to infrastructure, the way to scalability - Breizhca...
Immutability: from code to infrastructure, the way to scalability - Breizhca...
 
Prototyping web apps with Wordpress
Prototyping web apps with WordpressPrototyping web apps with Wordpress
Prototyping web apps with Wordpress
 
DNN Web API For Mobile
DNN Web API For MobileDNN Web API For Mobile
DNN Web API For Mobile
 
Building Hybrid Apps with Ember
Building Hybrid Apps with EmberBuilding Hybrid Apps with Ember
Building Hybrid Apps with Ember
 
Selenium training in chennai
Selenium training in chennaiSelenium training in chennai
Selenium training in chennai
 
Coffee script
Coffee scriptCoffee script
Coffee script
 
WordCamp SF 2011: Debugging in WordPress
WordCamp SF 2011: Debugging in WordPressWordCamp SF 2011: Debugging in WordPress
WordCamp SF 2011: Debugging in WordPress
 
Enterprising JavaFX
Enterprising JavaFXEnterprising JavaFX
Enterprising JavaFX
 

Viewers also liked

Monkey talk
Monkey talkMonkey talk
Monkey talkISsoft
 
82746248 study-of-nec-transmitter
82746248 study-of-nec-transmitter82746248 study-of-nec-transmitter
82746248 study-of-nec-transmitterhomeworkping3
 
MY FRIEND CALSS 3
MY FRIEND CALSS 3MY FRIEND CALSS 3
MY FRIEND CALSS 3Sanjoy Mudi
 
Social media for b2b - Madhouse Associates seminar
Social media for b2b - Madhouse Associates seminarSocial media for b2b - Madhouse Associates seminar
Social media for b2b - Madhouse Associates seminarSmoking Gun PR
 
Газета «Христианская Абхазия», Август 2014 г. № 8 (89)
Газета «Христианская Абхазия», Август 2014 г. № 8 (89)Газета «Христианская Абхазия», Август 2014 г. № 8 (89)
Газета «Христианская Абхазия», Август 2014 г. № 8 (89)anyhaorg
 
Social Media for B2B - Marta Majewska - Spring Creek
Social Media for B2B - Marta Majewska - Spring CreekSocial Media for B2B - Marta Majewska - Spring Creek
Social Media for B2B - Marta Majewska - Spring CreekMcCann Brussels
 
Sema local SEO 2010
Sema local SEO 2010Sema local SEO 2010
Sema local SEO 2010Wil Reynolds
 
امريكانا السعوديه
امريكانا السعوديهامريكانا السعوديه
امريكانا السعوديهMohamed Zakaria
 
Hands on iOS developments with jenkins
Hands on iOS developments with jenkinsHands on iOS developments with jenkins
Hands on iOS developments with jenkinsArnaud Héritier
 
Gale smm strategy and plan 20110222
Gale  smm strategy and plan 20110222Gale  smm strategy and plan 20110222
Gale smm strategy and plan 20110222Soumya Ravi
 
Sejarah Berdirinya Borobudur
Sejarah Berdirinya BorobudurSejarah Berdirinya Borobudur
Sejarah Berdirinya BorobudurFirdika Arini
 
Class expectations for online communication
Class expectations for online communicationClass expectations for online communication
Class expectations for online communicationerinmarkus
 
Automated Testing and Continuous Deployment for Mobile Apps with Jenkins
Automated Testing and Continuous Deployment for Mobile Apps with Jenkins Automated Testing and Continuous Deployment for Mobile Apps with Jenkins
Automated Testing and Continuous Deployment for Mobile Apps with Jenkins CloudBees
 
Get More Work: How to Build a Partnership With an Agency
Get More Work: How to Build a Partnership With an AgencyGet More Work: How to Build a Partnership With an Agency
Get More Work: How to Build a Partnership With an Agencybrandextract
 
Mobile testing and its part in testing tools
Mobile testing and its part in testing toolsMobile testing and its part in testing tools
Mobile testing and its part in testing toolsKari Kakkonen
 
How to configure monkey talk android agent
How to configure monkey talk android agentHow to configure monkey talk android agent
How to configure monkey talk android agentDasun Eranthika
 

Viewers also liked (20)

Monkey talk
Monkey talkMonkey talk
Monkey talk
 
Automating Firefox OS
Automating Firefox OSAutomating Firefox OS
Automating Firefox OS
 
82746248 study-of-nec-transmitter
82746248 study-of-nec-transmitter82746248 study-of-nec-transmitter
82746248 study-of-nec-transmitter
 
MY FRIEND CALSS 3
MY FRIEND CALSS 3MY FRIEND CALSS 3
MY FRIEND CALSS 3
 
Orlando Flores Jr. Resume
Orlando Flores Jr. ResumeOrlando Flores Jr. Resume
Orlando Flores Jr. Resume
 
Social media for b2b - Madhouse Associates seminar
Social media for b2b - Madhouse Associates seminarSocial media for b2b - Madhouse Associates seminar
Social media for b2b - Madhouse Associates seminar
 
Газета «Христианская Абхазия», Август 2014 г. № 8 (89)
Газета «Христианская Абхазия», Август 2014 г. № 8 (89)Газета «Христианская Абхазия», Август 2014 г. № 8 (89)
Газета «Христианская Абхазия», Август 2014 г. № 8 (89)
 
Inzoomen op de kaart
Inzoomen op de kaartInzoomen op de kaart
Inzoomen op de kaart
 
Social Media for B2B - Marta Majewska - Spring Creek
Social Media for B2B - Marta Majewska - Spring CreekSocial Media for B2B - Marta Majewska - Spring Creek
Social Media for B2B - Marta Majewska - Spring Creek
 
Sema local SEO 2010
Sema local SEO 2010Sema local SEO 2010
Sema local SEO 2010
 
امريكانا السعوديه
امريكانا السعوديهامريكانا السعوديه
امريكانا السعوديه
 
Sikuli for Mobile Testing
Sikuli for Mobile TestingSikuli for Mobile Testing
Sikuli for Mobile Testing
 
Hands on iOS developments with jenkins
Hands on iOS developments with jenkinsHands on iOS developments with jenkins
Hands on iOS developments with jenkins
 
Gale smm strategy and plan 20110222
Gale  smm strategy and plan 20110222Gale  smm strategy and plan 20110222
Gale smm strategy and plan 20110222
 
Sejarah Berdirinya Borobudur
Sejarah Berdirinya BorobudurSejarah Berdirinya Borobudur
Sejarah Berdirinya Borobudur
 
Class expectations for online communication
Class expectations for online communicationClass expectations for online communication
Class expectations for online communication
 
Automated Testing and Continuous Deployment for Mobile Apps with Jenkins
Automated Testing and Continuous Deployment for Mobile Apps with Jenkins Automated Testing and Continuous Deployment for Mobile Apps with Jenkins
Automated Testing and Continuous Deployment for Mobile Apps with Jenkins
 
Get More Work: How to Build a Partnership With an Agency
Get More Work: How to Build a Partnership With an AgencyGet More Work: How to Build a Partnership With an Agency
Get More Work: How to Build a Partnership With an Agency
 
Mobile testing and its part in testing tools
Mobile testing and its part in testing toolsMobile testing and its part in testing tools
Mobile testing and its part in testing tools
 
How to configure monkey talk android agent
How to configure monkey talk android agentHow to configure monkey talk android agent
How to configure monkey talk android agent
 

Similar to iOS Automated Testing with Calabash: Tips and Tricks

[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with AppiumSrijan Technologies
 
iOS and Android Acceptance Testing with Calabash - Xcake Dublin
iOS and Android Acceptance Testing with Calabash - Xcake DubliniOS and Android Acceptance Testing with Calabash - Xcake Dublin
iOS and Android Acceptance Testing with Calabash - Xcake Dublinroland99
 
Espresso workshop
Espresso workshopEspresso workshop
Espresso workshopKetan Soni
 
Green Light for the Apps with Calaba.sh - DroidCon Paris 2014
Green Light for the Apps with Calaba.sh - DroidCon Paris 2014Green Light for the Apps with Calaba.sh - DroidCon Paris 2014
Green Light for the Apps with Calaba.sh - DroidCon Paris 2014Jean-Loup Yu
 
iOS Automation Frameworks evaluation
iOS Automation Frameworks evaluationiOS Automation Frameworks evaluation
iOS Automation Frameworks evaluationSerghei Moret
 
Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...Niels Frydenholm
 
Beginning jQuery Mobile
Beginning jQuery MobileBeginning jQuery Mobile
Beginning jQuery MobileTroy Miles
 
Graceful Failure with Selenium and Continuous Integration
Graceful Failure with Selenium and Continuous IntegrationGraceful Failure with Selenium and Continuous Integration
Graceful Failure with Selenium and Continuous IntegrationChris B. France
 
Effectively Using UI Automation
Effectively Using UI AutomationEffectively Using UI Automation
Effectively Using UI AutomationAlexander Repty
 
E2E testing Single Page Apps and APIs with Cucumber.js and Puppeteer
E2E testing Single Page Apps and APIs with Cucumber.js and PuppeteerE2E testing Single Page Apps and APIs with Cucumber.js and Puppeteer
E2E testing Single Page Apps and APIs with Cucumber.js and PuppeteerPaul Jensen
 
Android testing calabash
Android testing calabashAndroid testing calabash
Android testing calabashkellinreaver
 
Functional Testing
Functional TestingFunctional Testing
Functional TestingAdam Hill
 
The Many Ways to Test Your React App
The Many Ways to Test Your React AppThe Many Ways to Test Your React App
The Many Ways to Test Your React AppAll Things Open
 
Hack in the Box GSEC 2016 - Reverse Engineering Swift Applications
Hack in the Box GSEC 2016 - Reverse Engineering Swift ApplicationsHack in the Box GSEC 2016 - Reverse Engineering Swift Applications
Hack in the Box GSEC 2016 - Reverse Engineering Swift Applicationseightbit
 
Testing Native iOS Apps with Appium
Testing Native iOS Apps with AppiumTesting Native iOS Apps with Appium
Testing Native iOS Apps with AppiumSauce Labs
 
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...Paul Jensen
 
How To Run/Test Flutter App On a Real Device?
How To Run/Test Flutter App On a Real Device?How To Run/Test Flutter App On a Real Device?
How To Run/Test Flutter App On a Real Device?Flutter Agency
 

Similar to iOS Automated Testing with Calabash: Tips and Tricks (20)

[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
 
iOS and Android Acceptance Testing with Calabash - Xcake Dublin
iOS and Android Acceptance Testing with Calabash - Xcake DubliniOS and Android Acceptance Testing with Calabash - Xcake Dublin
iOS and Android Acceptance Testing with Calabash - Xcake Dublin
 
Espresso workshop
Espresso workshopEspresso workshop
Espresso workshop
 
Green Light for the Apps with Calaba.sh - DroidCon Paris 2014
Green Light for the Apps with Calaba.sh - DroidCon Paris 2014Green Light for the Apps with Calaba.sh - DroidCon Paris 2014
Green Light for the Apps with Calaba.sh - DroidCon Paris 2014
 
iOS Automation Frameworks evaluation
iOS Automation Frameworks evaluationiOS Automation Frameworks evaluation
iOS Automation Frameworks evaluation
 
Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...
 
Beginning jQuery Mobile
Beginning jQuery MobileBeginning jQuery Mobile
Beginning jQuery Mobile
 
Selenium Training in Chennai
Selenium Training in ChennaiSelenium Training in Chennai
Selenium Training in Chennai
 
Graceful Failure with Selenium and Continuous Integration
Graceful Failure with Selenium and Continuous IntegrationGraceful Failure with Selenium and Continuous Integration
Graceful Failure with Selenium and Continuous Integration
 
Effectively Using UI Automation
Effectively Using UI AutomationEffectively Using UI Automation
Effectively Using UI Automation
 
E2E testing Single Page Apps and APIs with Cucumber.js and Puppeteer
E2E testing Single Page Apps and APIs with Cucumber.js and PuppeteerE2E testing Single Page Apps and APIs with Cucumber.js and Puppeteer
E2E testing Single Page Apps and APIs with Cucumber.js and Puppeteer
 
Android testing calabash
Android testing calabashAndroid testing calabash
Android testing calabash
 
Functional Testing
Functional TestingFunctional Testing
Functional Testing
 
The Many Ways to Test Your React App
The Many Ways to Test Your React AppThe Many Ways to Test Your React App
The Many Ways to Test Your React App
 
Automating android
Automating androidAutomating android
Automating android
 
Bug Hunting Safari
Bug Hunting SafariBug Hunting Safari
Bug Hunting Safari
 
Hack in the Box GSEC 2016 - Reverse Engineering Swift Applications
Hack in the Box GSEC 2016 - Reverse Engineering Swift ApplicationsHack in the Box GSEC 2016 - Reverse Engineering Swift Applications
Hack in the Box GSEC 2016 - Reverse Engineering Swift Applications
 
Testing Native iOS Apps with Appium
Testing Native iOS Apps with AppiumTesting Native iOS Apps with Appium
Testing Native iOS Apps with Appium
 
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
 
How To Run/Test Flutter App On a Real Device?
How To Run/Test Flutter App On a Real Device?How To Run/Test Flutter App On a Real Device?
How To Run/Test Flutter App On a Real Device?
 

iOS Automated Testing with Calabash: Tips and Tricks

  • 1. iOS Automated Testing with Calabash: Tips and Tricks Moncef Belyamani @monfresh Mobile Testing Summit / November 1, 2012 / San Francisco
  • 2.
  • 3.
  • 4.
  • 6. AUTOMATION TOOL CHECKLIST • Easy to set up and maintain • Updated regularly • Well-documented • Supports iOS and Android • Runs on devices untethered • Readable tests
  • 7. TOOLS EVALUATED • Anteater • Calabash • FoneMonkey (before it became MonkeyTalk) • Frank • KIF • TouchTest • UI Automation • Zucchini
  • 9.
  • 10. RECOMMENDED SETUP • Ruby 1.9.3 • RVM • Gemset • How to install Xcode, Homebrew, Git, RVM, & Ruby 1.9.3 on Snow Leopard, Lion, and Mountain Lion • Enhance your Ruby development with RVM gemsets and .rvmrc
  • 11. CALABASH TEST FEATURE FILE + STEP DEFINITION
  • 12. FEATURE EXAMPLE Feature: Comments In order to contribute to the discussion As a Hacker News reader I want to be able to add a comment Scenario: User not logged in Given I am not logged in When I go to comment on a submission Then I should be prompted to log in
  • 13. DON’T DO THIS Scenario: User logged in, but cancels comment form Given the app is running When I touch "Profile" Then I wait to see "Login" Then I fill in “Username” with "my_username" Then I touch “Password” Then I fill in “Password” with "my_password" Then I touch done Then I wait to see "Logout" Then I touch "Home" Then I touch list item number 1 Then I touch "reply" Then I touch "Cancel" Then I should see "Submission"
  • 14. DO THIS Scenario: User logged in, but cancels comment form Given I am logged in as “username” When I go to comment on a submission But I cancel the comment form Then I should see the submission And a comment from "username" should not appear
  • 15. STEP DEFINITION Given /^I am logged in as "([^"]*)"$/ do |username| macro 'I touch "Profile"' if element_exists("button marked:'Logout'") sleep(1) else macro %Q[I fill in “Username” with "#{username}"] macro 'I touch “Password”' macro 'I fill in “Password” with "my_password"' macro 'I touch done' macro 'I wait to see "Logout"' end end
  • 16. UPDATING IS EASY, BUT... • gem update calabash-cucumber • calabash-ios download (not with SVN) • curl http://localhost:37265/version (to verify framework is up to date) • May need to “Reset Content and Settings” in Simulator • When new files are added, update Target Membership
  • 17.
  • 18. KEEP IN MIND Swiping depends on device orientation Can only touch visible items
  • 19. TIPS & TRICKS Use .bash_profile aliases self.myButton.accessibilityElementsHidden = YES; Use console to experiment and “query” to find elements Participate in the Google Group Get commit notifications with GitHub for Mac
  • 20. RECOMMENDATIONS • Full-time Automation Engineer • Work with Dev to make apps accessible • Continuous Integration • Contribute fixes and custom steps
  • 21. REFERENCES • iOS Automated Testing with Calabash, Cucumber, and Ruby • Create aliases in .bash_profile to assign shortcuts for common Terminal commands • A Calabash custom step to Swipe to delete all cells in a Table View • Code for America • AOL Mobile
  • 22. Moncef Belyamani @monfresh moncef@monfresh.com moncefbelyamani.com about.me/moncef