Appium for mobile automation

Burak Dönmez
Mobile Application Testing
2 min readApr 8, 2020

Mobile application test process has lots of free tools. Appium is the biggest one. Developers/test engineers can write appium test using many programming languages.Its tests can be written in Python, Java, JavaScript, C#. Here we talk about appium structure. This tutorial is not about writing test codes.

Try RobotQA cloud based device farm for debugging for free:

Link: RobotQA

Appium is nodejs based platform. When you download desktop application and start it, it starts server in your computer. Default port is 4723. Normally, appium uses more than one ports when testing.

Appium uses lots of node modules. As i mentioned before, appium is nodejs based. So that, you can find module list in package.json in source code. This is the screenshot of package.json.

When you do npm install, all these modules are added. These modules also depend others modules. So that, dependent modules are also added your node_modules folder.

Here, appium_base_driver is used both android and ios automation. It is responsible for request forwarding. This means that when appium does request like action_click , firstly, it goes to base_driver and this module forwards request to related module.

For android, appium_uiautomator2_driver is responsible for doing actions. It finds elements in phone screen. Ui dump is used to find elements in screen. After that, requested action is done by uiatomator2_driver. For example, when you send click action for x element with y id, uiautomator driver firstly finds element with y id. After that it does the operation. In this case, it does click action using x and y coordinates of element.

For iOS, appium_xcuitest_driver is responsible for doing actions. The main strategy is the same with android. However, for ios the processes are little bit difficult (as always for ios). A objective-c based project is used in this repo named Web driver agent. The request comes to xcuitest and it sends the request to web driver agent. This is a application that is installed by appium and running on iOS device. Web driver agent finds element and does the requested operation.

These are the basic logic of Appium. In next tutorial, i will go deeper to appium and how to write appium test codes.

--

--

Burak Dönmez
Mobile Application Testing

Sharing experiences about mobile test automation. cofounder @roboticmobi