iOS Developers Conference-iOS Automation with Cucumber, Appium and Saucelabs

2,244 views

Published on

iOS Developers Conference at SkillsMatter on iOS automation with Appium, Cucumber and Suacelsbs.

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,244
On SlideShare
0
From Embeds
0
Number of Embeds
563
Actions
Shares
0
Downloads
15
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

iOS Developers Conference-iOS Automation with Cucumber, Appium and Saucelabs

  1. 1. iOS Automation with Cucumber Appium and Saucelabs Shashikant Jagtap Twitter:@Shashikant86 Blogs: http://shashikantjagtap.net
  2. 2. Topics ● Appium Introduction ● Installation & Setup ● Setting up Mobile App for Appium ● Appium Inspector ● Setting Cucumber Project ● Demo:Cucumber+Appium+Saucelabs
  3. 3. Appium ● Open Source test automation Framework ● Hybrid and Native Apps ● Uses WebDriver JSON Protocol
  4. 4. How Appium Works? ● Selenium Server for iOS ● Handles WebDriver sessions ● Logs every action on the Mobile App ● Uses Apple Instruments for iOS ● Use WebDriver Capabilities https://code.google.com/p/selenium/wiki/Desi redCapabilities
  5. 5. iOS Requirements ● Mac OSX 10.7 + ● Xcode 4.5 + Command Line Tools ● HomeBrew ● NodeJS and npm ● Ruby, RVM and Git
  6. 6. Installing Appium ● NodeJS $ brew install node $ npm install -g appium $ npm install wd ● Appium App Download Appium App http://appium.io/
  7. 7. Running Appium Server ● Start Appium $ ./node_modules/.bin/appium ● Authorize_iOS $./node_modules/.bin/authorize _ios ● OR Start Appium with App
  8. 8. Appium 1.0 ● New Client Libraries for all languages ● New WebDriver Desired Capabilities ● Full XML and Xpath Support ● New Locator Strategy ● Brand New Appium OSX App
  9. 9. Setting Mobile App for Appium ● Locally $ cd your_awesome_app $ xcodebuild -sdk iphonesimulator6.0 ● APP_PATH $ cd build/Release- iphonesimulator/
  10. 10. Setup APP for Saucelabs ● Setup $ xcodebuild -sdk iphonesimulator6.0 TARGETED_DEVICE_FAMILY=1 ● Zip Your APP $ zip -r APP.zip /build/Release- iphonesimulator/APP.app ● Upload with Sauce REST
  11. 11. Upload Zip on Saucelabs ● REST API $ curl -u USERNAME:API_KEY -X POST "http://saucelabs.com/rest/v1/stora ge/USERNAME/PlainNote.zip? overwrite=true" -H "Content-Type: application/octet-stream" --data- binary @/path/to//build/Release- iphonesimulator/APP.zip
  12. 12. Appium Inspector ● Inspects Elements on the Mobile App ● Controls user actions like tap, swipe, scroll, shake etc etc ● Generate Test Script in WebDriver Supported Languages ● Record and Playback
  13. 13. Appium Inspector ● Inspect Elements on Mobile App ● Record all actions on your App ● Record actions like tap, swipe and shake and support major programming languages ● Support Xpath
  14. 14. Cucumber ● BDD Tool ● Write Feature File ● Create config file ● Implement Step Definition ● Make Scenarios Pass ● Be Happy
  15. 15. Saucelabs ● Cross Browser, Cross-Platform and Cross-Device Cloud Testing Frameworks ● Supports Almost all available browsers, platforms and Device combinations ● Free Account will give you USERNAME and API KEY https://saucelabs.com
  16. 16. Feature File
  17. 17. Selenium_Config
  18. 18. Sauce_Config
  19. 19. Step_definitions
  20. 20. LIVE DEMO
  21. 21. Live Demo Time $ git clone https://github.com/Shashikant86/ cucumber-appium $ cd cucumber-appium $ rvm use 1.9.3 $ bundle install $ bundle exec cucumber features/plain_note.feature
  22. 22. Live Demo Blogs ● Source Code: Shashikant86/cucumber-appium http://tinyurl.com/pvap9ge ● MY Demo blog Saucelabs http://tinyurl.com/nr4onfe ● Demo [Personal blog] http://tinyurl.com/pd2ksxx
  23. 23. THANK YOU Have fun with New Appium 1.0 !!

×