Appium: Running tests on a device connected to a remote system (uiautomator2)

Praveen David Mathew
2 min readMay 26, 2021

Architecture:

Credit Github: https://github.com/appium/appium/issues/10503
Credit Github: https://github.com/appium/appium/issues/10503

Here we are running scripts from a remote/local Appium server while the devices are connected to another system in the network.

Setup:

  1. Start adb server in the system in which devices are connected:

Just run the below command in cmd (given adb is available in path)

adb kill-serveradb -a -P 5037 server nodaemon

Appium capabilities:

Now to run appium tests we need to add the below capability:

Try appium inspector from the remote system with below capability (edit all other fields according to your setup except remoteAdbHost,systemport and adbPort)

here remoteadbhost is the remote system which has connected devices, system port is the uiautomator2 server port which is 8021 by default and finally adbport

This will allow you to inspect the remote devices from your local system

{
“platformName”: “Android”,
“appium:platformVersion”: “11”,
“appium:deviceName”: “sr”,
“appium:app”: “C:\\Users\\Downloads\\ApiDemos-debug.apk”,
“appium:automationName”: “UiAutomator2”,
"remoteAdbHost":"192:168.0.7"…

--

--

Praveen David Mathew
Praveen David Mathew

Written by Praveen David Mathew

An open source advocator/WebdriverIO Projectcommiter/Postman Supernova/Postman-html-extra contributor/Stack overflow sqa moderator/Speaker

Responses (2)