Today, a lot is going on in the field of mobile development, and we need to test these developments to meet the expectations of the end users. It is this progress that has contributed to the growth of mobile automation. Dan Cuellar came up with a brilliant idea that involved integrating the tool with Selenium, post which he created Appium. Appium is a good tool and is widely used to automate mobile apps. The best part is that it is open source.
In this chapter, we will learn the following:
Appium is an open source tool for automating mobile apps, such as native, web-based, and hybrid applications designed for the Android, iOS, and Firefox OS platforms.
Before diving into Appium's advantages, let's discuss its shortcomings, as follows:
Now, let's discuss Appium's advantages on the basis of its philosophy.
The Appium philosophy has a different appeal from other competitors. The official philosophy (http://appium.io/slate/en/master/?java#appium-philosophy) is as follows:
Appium uses vendor-provided frameworks under the hood, which meets the first requirement, so we don't need third-party code to compile the app. We can test the same build of the app that we are going to submit in the marketplace. For our second requirement, Appium extends the WebDriver client libraries, which are already written in most popular programming languages. So, we are free to use any programming language in order to write the automation test scripts.
Appium extends the existing WebDriver JSONWP with additional API methods that are convenient for mobile automation. So, Appium has the same standard as WebDriver and no reinvention for the mobile automation framework, which meets the third requirement. Last but not least, it is open source.
It provides cross-platform solutions for native and hybrid mobile apps, which means that the same test cases will work on multiple platforms. If you are familiar with Selenium WebDriver, you will feel at home with Appium, otherwise you will first need to learn WebDriver for a better understanding. Appium uses the same scripting as WebDriver. Appium allows you to talk to other Android apps that are integrated with App Under Test (AUT). For example, you can hit another app from the AUT such as a camera app. It also supports cloud-based testing; you can run your test scripts in the cloud using services such as Sauce Labs and Testdroid. They provide services to run tests on real devices or simulators.
These advantages make it superior over other mobile automation tools. The following table shows Appium's advantages over other tools based on its philosophy:
Tools |
R1 |
R2 |
R3 |
R4 |
---|---|---|---|---|
Calabash |
No |
No |
No |
Yes |
iOS driver |
Yes |
Yes |
Yes |
No |
Robotium |
No |
No |
Yes |
No |
Selendroid |
No |
Yes |
Yes |
No |
Appium |
Yes |
Yes |
Yes |
Yes |
35.170.81.33