According to the Economic Times, India is set to have 651 million smartphones and 18.7 million tablets by 2019. The trend of shifting towards mobile phones has been exponentially increasing over the past decade, resulting in reduced traffic at the websites. The current situation is such that, there are rapid changes in the mobile projects, but we do not have appropriate testing tools for mobile projects, as compared to their desktop counterparts. This mobile testing strategy is comparatively difficult to define.
Tech Vedika is working on developing several mobile apps for a wide range of clients across the globe. To ensure the quality of the mobile app product, these days there are multiple techniques used for testing mobile applications. One such open-source test framework for mobile app testing is Appium.
What Is Appium?
Appium is a mobile app UI test automation tool developed and supported by Sauce Labs. It drives iOS and Android apps using the WebDriver protocol. It is independent of the Operating System of the mobile device. It can test the native and hybrid mobile app as well as web applications. It supports automation tests on physical devices (iOS, Android, FirefoxOS) as well as emulators (Android) and simulators (iOS, FirefoxOS).
It also offers cross-platform application testing. There are many other automation tools available in the market, such as – Frank, MonkeyTalk, Calabash; but most of these tools have to recompile the app so that the tool can interact with the mobile app, out of all these tools Appium stands more useful.
Client/Server Architecture:
Appium is an https server handling multiple Web Driver Sessions. Appium client establishes a connection with Appium server through JSON Wire Protocol. It receives connections from a client, listens for commands, executes those commands on a mobile device, and responds with an https response representing the result of the command execution. Each platform (Android and iOS) has a different mechanism to run a test case based on the commands from the Appium server.
Appium in Android:
Appium client connects with Appium Server through JSON Wire Protocol. Appium Server creates a session for the client and checks the desired capabilities of the client and connects with frameworks like Selendroid/UIAutomator, which will then communicate with bootstrap.jar running in an Emulator/Real device for performing client operations.
Bootstrap.jar act as a TCP server to perform an action on our AUT (Application Under Test)
Once the command is executed the client sends back the message to the Appium server which logs everything related to the command in its console. This cycle keeps going till the time all the commands get executed.
Appium In IOS
Appium client connects with Appium Server through JSON Wire Protocol. Appium Server creates a session for the client and checks the desired capabilities of the client and connects with UI Automation/Instruments, (Apple provides this application called ‘instruments’ which is used for multiple purposes like profiling, controlling, and building iOS apps) which will then communicate with bootstrap.js running in Simulator/Real device for performing client operations. Bootstrap.js acts as a TCP server to perform an action on our AUT (Application Under Test)
Once the command is executed the client sends back the message to the Appium server which logs everything related to the command in its console. This cycle keeps going till the time all the commands get executed.
Limitations of Appium:
- No support for Windows mobile apps
- No Support for Android API level < 17.
- Limited support for gestures.
- No support for Toast messages.