What is Appium ?
Appium, Appium automation testing or Appium tool is an open source testing tool or a platform which is used to test automation on mobile applications. With Appium automation testing you can test native applications on a mobile like calendar ,web mobile applications which you can use or access using web browsers like chrome or hybrid applications which are combination of native and web mobile applications like Amazon, Netflix. Appium can used on iOS,Android and windows desktop mobile platforms.It allows us to test on your physical devices as well as on emulator or simulators too. Appium is suitable with a wide range of frameworks and languages.We can write appium client or appium scripts in many programming languages. The programming languages supported by appium are Java,Ruby,Python,PHP,C#,Javascript etc.
Appium was developed by Dan Cuellar in 2011 under the name “iOSAuto” which was written in C# language.In 2012, it was made open-sourced.
Appium Automation Testing
How it Works?
Appium Client Server Architecture:
Appium uses client server architecture.In a Client Server design you have a client and have a server and they can both talk to each other using a protocol with some network. Node.js Platform used to write HTTP Server known as Appium . So when you install or download Appium you are in actual installing the Appium Server.
Appium Client:
Languages like Java, Python, Ruby etc used to write the client libraries which are Appium client Libraries. So, we download these libraries and use them in our mobile automation framework. For example: if you want to create an Appium automation framework in java, you will download the java appium client libraries add them into my framework and then use its functions. So, the code that you create using client libraries when you run it goes to the Appium Server and then Appium Server in turn processes the requests and responds with test result or log files. It can support Android,Windows and iOS platforms.
Appium uses Selenium web driver library so that is the reason it can be used in all languages that are supported by Selenium Web Driver.
JSON Wire Protocol:
We cannot directly send the request in which we have written our Appium client code to the server, so we have here JSON Wire protocol which converts our request into HTTP REST format which is readable for Appium Server. Appium will use mobile JSON wire protocol. It is basically an extension to Selenium JSON wire Protocol which can control different mobile devices behaviours. It cannot directly perform action on device so to perform actions on the application it uses various vendor specific Drivers.
For example ,if we use an Android Device then we will use UI Automator or Selendroid. So, every device goes with different vendor specific framework.
Some of the Vendor Specific Drivers are:
XCUITest, UIAutomation for iOS Devices, UIAutomator / UIAutomator2 or Selendroid for Android Devices, WinAppDriver for windows.
Why do we choose Appium?
- The major advantage of appium is that it is free,anybody can use this without paying anything.
- It supports native,web and hybrid applications.
- It can support applications that are developed for Android and IOS both.
- It supports so many programming languages.For example:If you know only Java then you can write your automation code in java in appium.Same goes for other languages.
- It provides cross platform.
- It doesnot require recompilation.
- We can test on physical devices as well as simulators and emulators in Appium.
- Supports major IOS versions.
- We do not have to install extra dependencies.
Limitations
- We can’t use Appium testing on Android versions less than 4.2.
- It doesn’t support image recognition so comparison between images is not possible.
Selendroid
Selendroid is a framework which is used to support all the android versions which are below 4.3 version in Appium.
Difference between Appium and Selendroid
Appium
- It is an open source tool which works on both iOS and Android devices.
- We do not have to reinstall it after any modification.
- It is used by so many active developers.
- We can use so many languages and frameworks in Appium.
Selendroid
- It works only as Android-only test framework.
- Whereas in Selendroid,if there is any small modification we have to reinstall it again.
- It doesn’t have large no. of active developers.
- It is only compatible with Jenkin and Selenium.
Difference between Appium and Selenium
Appium
- Appium is an open source testing tool for native,hybrid and mobile web Applications.
- It allows us to test on mobile applications on Android and iOS and desktop applications.
- Appium is designed as HTTP server because it handles any mobile App. So, for testing any mobile app you have to firstly install Node JS on your system to use Appium tool.
Selenium
- Selenium is an common automated testing tool for web Applications.
- It is compatible with testing on multiple web browsers and operating systems like MacOS,Linux and Windows.
- It is used for maintaing testing on web applications or web pages. It interacts with web applications very easily and quickly with only using browser activities.