Share
Embed
Appium • Mobile Automation Made Awesome (Part I)
An introduction to Cross Platform Mobile Apps atuomated testing.
Cassian LUP
October 29, 2014
Transcript
32 slides
-
Mobile Automation Made Awesome. Cassian Lup •
Senior UI Developer • 3Pillar Global • / cassi.lup -
Cassian Lup • Senior UI Developer • 3Pillar Global •
/ cassi.lup Why test? -
Cassian Lup • Senior UI Developer • 3Pillar Global •
/ cassi.lup The Beaten Path -
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 -
Cassian Lup • Senior UI Developer • 3Pillar Global •
/ cassi.lup What is Appium? -
Cassian Lup • Senior UI Developer • 3Pillar Global •
/ cassi.lup Tests Apple Instruments JavaScript Google UiAutomator Java What is Appium? -
Cassian Lup • Senior UI Developer • 3Pillar Global •
/ cassi.lup Tests Apple Instruments JavaScript Google UiAutomator Java Selenium Tests (Preferred Language) What is Appium? -
Cassian Lup • Senior UI Developer • 3Pillar Global •
/ cassi.lup Tests Apple Instruments JavaScript Google UiAutomator Java WD What is Appium? -
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? -
Cassian Lup • Senior UI Developer • 3Pillar Global •
/ cassi.lup What is Appium? -
Cassian Lup • Senior UI Developer • 3Pillar Global •
/ cassi.lup Selenium WebDriver JSON Wire Protocol -
Cassian Lup • Senior UI Developer • 3Pillar Global •
/ cassi.lup Selenium WebDriver — JSON Wire Protocol -
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 -
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. -
Cassian Lup • Senior UI Developer • 3Pillar Global •
/ cassi.lup The Appium Way -
Cassian Lup • Senior UI Developer • 3Pillar Global •
/ cassi.lup The Appium Way 1. Test the same app you submit to the marketplace. -
Cassian Lup • Senior UI Developer • 3Pillar Global •
/ cassi.lup Tests Apple Instruments JavaScript Google UiAutomator Java The Appium Way -
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) -
Cassian Lup • Senior UI Developer • 3Pillar Global •
/ cassi.lup Tests Apple Instruments JavaScript Google UiAutomator Java Preferred Language The Appium Way -
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) -
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. -
Cassian Lup • Senior UI Developer • 3Pillar Global •
/ cassi.lup Install Appium -
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 -
Cassian Lup • Senior UI Developer • 3Pillar Global •
/ cassi.lup Writing Tests -
Cassian Lup • Senior UI Developer • 3Pillar Global •
/ cassi.lup Writing Tests Jasmine, Mocha, Cucumber -
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 -
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 -
Cassian Lup • Senior UI Developer • 3Pillar Global •
/ cassi.lup Writing Tests Code -
Cassian Lup • Senior UI Developer • 3Pillar Global •
/ cassi.lup Writing Tests To Be Continued… -
Cassian Lup • Senior UI Developer • 3Pillar Global •
/ cassi.lup tapsterbot (Mobile device automation robot) -
Cassian Lup • Senior UI Developer • 3Pillar Global •
/ cassi.lup Thank you.