Appium is an open-source tool for automating native, mobile web, and hybrid applications on iOS and Android platforms. Native apps are those written using the iOS or Android SDKs.Mobile web apps are web apps accessed using a mobile browser (Appium supports Safari on iOS and Chrome or the built-in ‘Browser’ app on Android).
Importantly, Appium is “cross-platform”: it allows you to write tests against multiple platforms (iOS, Android), using the same API. This enables code reuse between iOS and Android testsuites.
Appium was designed to meet mobile automation needs according to a philosophy outlined by the following four tenets:
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 is at its heart a webserver that exposes a REST API. It receives connections from a client, listens for commands, executes those commands on a mobile device, and responds with an HTTP response representing the result of the command execution. The fact that we have a client/server architecture opens up a lot of possibilities: we can write our test code in any language that has a http client API, but it is easier to use one of the Appium client libraries. We can put the server on a different machine than our tests are running on. We can write test code and rely on a cloud service like Sauce Labs to receive and interpret the commands.
Automation is always performed in the context of a session. 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 respond with a session ID which is used for sending further commands.
Appium.app / Appium.exe : There exist GUI wrappers around the Appium server that can be downloaded. These come bundled 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. You can download appium form appium.io
- You don’t have to recompile your app or modify it in any way, due to use of standard automation APIs on all platforms.
- You can use any testing framework
- Mac OS X 10.7 or higher, 10.9.2 recommended
- XCode >= 4.6.3, 5.1.1 recommended
- Apple Developer Tools (iPhone simulator SDK, command line tools)
- Ensure you read our documentation on setting yourself up for iOS testing
- Android SDK API >= 17 (Additional features require 18/19)
- Appium supports Android on OS X, Linux and Windows. Make sure you follow the directions for setting up your environment properly for testing on different OSes:
We will talk about Appium GUI elements and how to setup Appium in the next blog article.