Testing with Appium Framework About Me Petr Palata iOS Developer@Wandera petr.palata@wandera.com (De)Motivation Pros Huge time saver on repetitive testing cases Good safety net for developers Generally more interesting than manual testing Cons Test cases need to be updated by someone Sometimes, a slight change in the UI might break a lot of tests If the application is small enough it might not pay out at all A Little Bit of History It always starts with a lazy or frustrated programmer. It wasn’t different for Appium. Appium Philosophy 1. You shouldn't have to recompile your app or modify it in any way in order to automate it. 2. You shouldn't be locked into a specific language or framework to write and run your tests. 3. A mobile automation framework shouldn't reinvent the wheel when it comes to automation APIs. 4. A mobile automation framework should be open source, in spirit and practice as well as in name! Appium Architecture Appium Server Client WebDriver Backend Simulator/Real Device Request Response API calls Starting a Session { "platformName": "iOS", "platformVersion ": "11.0", "deviceName": "iPhone 7", "automationName ": "XCUITest", "app": "/path/to/my.app" } Appium Server Client POST /session :session_id Sending a Command Appium Server Client POST /session/:session_id/orientation { "orientation": "LANDSCAPE" } Simulator UIDevice.sharedDevice() .deviceOrientation = .Landscape Basic Testing Workflow Action Find Element Find Element Check Attributes Searching for Elements XPath Element “Class” Element “Id” Complex Testing Use-cases No Internet Only Cellular Data Location is Unavailable Appium Desktop and Appium Inspector Demo! Summary Testing is generally a good thing but always try to reason about using a particular technology or approach. Multiplatform tests have their drawbacks. Definitely try it, tinker with it a little and see what’s possible for yourself.