Script Command Flow in Appium:
1.Command written in script e.g.Click() is sent as an http request to Appium Server
2.Appium server then translates it into UIAutomator API calls if working on Android and into UIAutomation API calls(i.e. java script) if working on IOS.
3.These translated commands are then sent to Bootstrap agent running on mobile device
4.Bootstrap agent runs these commands on Application Under Test running on device and returns the result of command to Appium server and then server returns it to script as http response
1.Appium client libraries
2.IDE for your chosen language
4.If working on IOS then we need to have MAC machine to run Appium server(reason for this is:as told,Appium uses automaton frameworks comes with respective SDKs for its functioning.For running test on IOS application it requires UIAutomation which comes with IOS SDK)
5.If we will be running test on real IOS device then we need to have our application signed with "DEVELOPER PROVISIONING PROFILE"(reason of this:It is the requirement of UIAutomation framework which Appium uses to run your operations on AUT)
Test Automation Lab setup:
Machine on which test would be developed need to have IDE and Software Development Kit(JDK in case scripts are written using Java)
If machine will only be running developed scripts then no need to have IDE or development kit,only runtime environment will be sufficient.
In case of Android application automation,windows/MAC machine can serve as server machine but in case of IOS application automation server machine has to be MAC.
Server machine needs:
a)Appium server running on a machine
b)Real mobile device attached through USB/Wifi or simulator/emulator running
c)Android SDK in case of Android automation.Xcode,command line tools in case of IOS automation
Is Appium automation really FREE?
Most of the organisations opt for open_source tools because either they are very new to Test Automation and hence not confident about ROI of test automation and others,though they can invest into test automation they don't want to,simply because they want to do cost cutting.
Now,listen carefully,though Appium tool is free,Appium automation is not.It means if you are doing Appium automation on IOS applications then you need to invest into following:
1. One MAC machine per IOS device.
We can not have 2 IOS devices attached to 1 MAC and running scripts simultaneously.
2.Developer provisioning profile which needs to be renewed per year.
(Above 2 points are emphasized here because,many a times people go on doing POC of open source automation tools just because they are FREE and then end up being disappointed on knowing about investment they will have to do to be able to work with that tool.Cost of investment these tools demand is far lesser than subscription based license tools like Seetest but still it has to be emphasized to avoid disappointment at later stages.)
Advantages of Appium:
1.Any Selenium user can learn Appium easily due to its similarities in architecture and working with Selenium.
Well known and frequently used tools/utilities with Selenium,like Apache Ant,Apache maven,Github and TestNG are also used with Appium .
2.It uses existing automation frameworks and hence if Appium API does not support any operation we can use capabilities of these frameworks
3.It can be integrated with Continuous Integration frameworks like Jenkins
4.No need to jailbreak the device
Disadvantages of Appium:
1.Appium can not access custom developed classes which are used to design native mobile applications
For example: Many a times developers don't use SDK native controls to design their applications,instead they create their own custom class and design their controls. e.g. If I want to design button control and give it those capabilities which I can not give using native android.widget.Button class,then what I will do I will create my own custom class say com.pranoday.button which will be derived from android.widget.button and then implement my logic,set some properties using my custom class(com.pranoday.button in this case).Appium then will not be able to access those properties which I have assigned through com.pranoday.button Other tools use concept of application instrumentation to access such data.
2.It also can not do API calls to access that data of GUI control,which can not be accessed through properties.
For example:Say I want to access the such information about any control which cant be accessed through properties available to Appium(e.g. Font attached) then we have to rely on doing API call of that control to access that information,which is currently not possible with Appium.But it is possible with tools like Seetest.
3.For IOS application automation you can not just download .ipa of any application from play store and automate it.You need to have source code of application.If you are running your tests on simulators then you need to install application from source and if you are running your tests on real device then you will be needing source code to get it signed with "Developer Provisionning Profile"
Pre-requisite to learn Appium:
1.Knowledge of Selenium architecture
2.Knowledge of Selenium WebDriver API
3.Android/IOS mobile application testing knowledge
4.Knowledge of utilities like Apache Ant,Apache Maven,ADB,
5.Basics of Android/IOS SDK
Sources you can look for help on Appium:
2.https://discuss.appium.io(very active and helpful community on Appium)
NOTE for Selenium users:Selenium does support web application automation on mobile operating systems like Android and IOS but it does not support automation of native and hybrid application on mobile platforms.