Category Archives: Appium

Mobile Automation Testing: Appium Installation for Mac

  1. Install Xcode
    • Check for iOS Simulator version in Xcode
  2. Install Java (JDK)
    • Verify installation in Terminal with following command
      • java -version
      • If version number appears, then it is installed
  3. Install Eclipse IDE for Java EE Developers
    • Ensure Java is installed or Eclipse will not run
  4. Download Appium Server / Jars from MVN repository
  5. Download Selenium Jars

Mobile Automation Testing: Appium: Guts and Glory

Appium follows client/server architecture. It’s a webserver that exposes REST API

  1. It received connection from a client, listens for commands, executes those commands on a mobile device and responds with HTTP representing the results of the command execution

Clients initiate a session with a server in ways specific to each library, but they all end up sending a POST/session request to the server, with a JSON object called the ‘desired capabilities’ object. At this point the server will start up the automation session and responds with a session ID which is used for sending further commands.

Desired capabilities are a set of keys and values (i.e. a map or hash)) sent to the Appium server to tell the server what kind of automation session we’re interested in starting up

  1. There are various cababilites which can modify the behavior of the server during automation (examples…)
    • We might set the ‘platformName’ capability to iOS to tell Appium that we want an ‘iOS’ session, rather than an Android one
    • Or we might set the ‘safariAllowPopups’ capability to ‘true’ in order to ensure that, during a Safari automation session, we’re allowed to use Javascript to open up new windows
    • The complete list of capabilities is in Appium’s documentation

Appium is a server written in Node.js. It can be built and installed from source or installed directly from NPM.

Appium has client libraries (in Java, Ruby, Python, PHP, Javascript, and C#) which support its extensions to the WebDriver protocol. When using Appium, you want to use these client libraries instead of regular WebDriver client ones.

There exist GUI wrappers around the Appium server that can be downloaded. These come bundeled with everything required to run the Appium server, so you don’t need to worry about Node. They also come with an Inspector, which enables you to check out the hierarchy of your app. This can come in handy when writing tests.

Mobile Automation Testing: Next Thing Next: Why Appium?

Appium is an open source, cross-platform test automation tool for native, hybrid, and mobile web pages, tested on simulators (iOS, FirefoxOS), emulators (Android), and real devices (iOS, Android, FirefoxOS).

The supported platforms are those that can be tested on using simulators, emulators, and real devices i.e.:

  1. iOS
  2. Android OS
  3. Firefox OS

So why Appium?

  1. You don’t have to recompile your app or modify it in any way, due to use of standard automation APIs on all platforms
  2. You can use any testing framework
  3. You can write the code in any language supported by Webdriver

If you use Apple’s UIAutomation library without Appium you can only write tests using Javascript and you can only run testes through the instruments application. Similarly, with Google’s UIAutomator you can only write tests in Java. Appium opens up the possibility of true cross-platform native mobile automation.

Mobile Automation Testing: First Thing First: What is Appium?

I’m currently on an adventure to learn automation. Tuck and roll with me as I learn and troubleshoot the framework as well as write scripts.

First couple of things I’ve learned so far and will be doing are:

  1. Appium is a open source mobile automation testing tool for Android and iOS application for both Native, Hybrid, and mobile web apps. It supports Selenium Web Driver API.
  2. Selenium and one of the supported languages (Java, C#, Javascript, Python, Ruby) is needed to learn Appium.
  3. I’ll be developing, architecting, and designing a mobile automation framework which my Appium test cases will be imported into.
  4. IDE’s for writing Java are Eclipse, IntelliJ, and Android Studio.