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

Appium • Mobile Automation Made Awesome (Part I)

Appium • Mobile Automation Made Awesome (Part I)

An introduction to Cross Platform Mobile Apps atuomated testing.

Cassian LUP

October 29, 2014

Transcript

32 slides
  1. Mobile  Automation  Made       Awesome. Cassian  Lup  •

     Senior  UI  Developer  •  3Pillar  Global  •              /  cassi.lup
  2. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup The  Beaten  Path
  3. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup iOS calabash-ios Frank UIAutomation ios-driver KeepItFunctional Android calabash-android MonkeyTalk Robotium UIAutomator selendroid The  Beaten  Path
  4. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup What  is  Appium?
  5. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup Tests Apple Instruments JavaScript Google UiAutomator Java What  is  Appium?
  6. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup Tests Apple Instruments JavaScript Google UiAutomator Java Selenium Tests (Preferred Language) What  is  Appium?
  7. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup Tests Apple Instruments JavaScript Google UiAutomator Java WD What  is  Appium?
  8. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup • HTTP server written in node.js • creates and handles multiple WebDriver sessions • for different platforms like iOS and Android What  is  Appium?
  9. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup What  is  Appium?
  10. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup Selenium  WebDriver   JSON  Wire  Protocol
  11. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup Selenium  WebDriver  —  JSON  Wire  Protocol
  12. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup Selenium  WebDriver  —  JSON  Wire  Protocol Appium Capabilities: • Tap • Fill in forms
 (type text, selects, radios, checkboxes) • Gestures • Multitouch
  13. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup Selenium  WebDriver  —  JSON  Wire  Protocol POST /session/:sessionId/element/:id/click Click on an element. t POST /session/:sessionId/touch/scroll Scroll on the touch screen using finger based motion events. DELETE /session/:sessionId/cookie/:name Scroll on the touch screen using finger based motion events. GET /session/:sessionId/touch/alert_text Gets the text of the currently displayed JavaScript alert(), t confirm(), or prompt() dialog.
  14. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup The  Appium  Way
  15. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup The  Appium  Way 1. Test the same app you submit to the marketplace.
  16. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup Tests Apple Instruments JavaScript Google UiAutomator Java The  Appium  Way
  17. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup The  Appium  Way 1. Test the same app you submit to the marketplace. 2. Write your tests in any framework, using any language.
 (Python, Ruby, JS — Node.js, Obj-C, Java)
  18. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup Tests Apple Instruments JavaScript Google UiAutomator Java Preferred Language The  Appium  Way
  19. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup The  Appium  Way 1. Test the same app you submit to the marketplace. 2. Write your tests in any framework, using any language.
 (Python, Ruby, JS — Node.js, Obj-C, Java) 3. Use a standard automation specification and API.
 (SE WebDriver)
  20. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup The  Appium  Way 1. Test the same app you submit to the marketplace. 2. Write your tests in any framework, using any language.
 (Python, Ruby, JS — Node.js, Obj-C, Java) 3. Use a standard automation specification and API.
 (SE WebDriver) 4. Build a large and thriving open-source community effort.
  21. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup Install  Appium
  22. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup $ brew install node # get node.js $ npm install -g appium # get appium $ npm install wd # get appium client $ appium & # start appium $ node your-appium-test.js Install  Appium
  23. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup Writing  Tests
  24. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup Writing  Tests Jasmine, Mocha, Cucumber
  25. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup // capabilities for iOS simulator var capabilities = { browserName: "", autoWebview: true, platformName: "iOS", platformVersion: "7.0.3", deviceName: "iPhone 5", app: path.resolve("../platforms/ios/build/emulator/myApp.app") }; Writing  Tests
  26. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup // capabilities for Android emulator var capabilities = { browserName: "", platformName: "android", deviceName: “My Android Virtual Device", app: path.resolve("../platforms/android/build/myApp.apk") }; Writing  Tests
  27. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup Writing  Tests Code
  28. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup Writing  Tests To  Be  Continued…
  29. Cassian  Lup  •  Senior  UI  Developer  •  3Pillar  Global  •

                 /  cassi.lup tapsterbot    (Mobile  device  automation  robot)

More Decks by Cassian LUP

Other Decks in Programming