Appium server executing commands with local device instead of remote device

I am running Appium server on Windows Machine-1. Here Android device 1 is connected.
My Android device-2(ZF65TRM) is connected to Windows Machine-2.

I am using Appium Inspector in Windows Machine-2 and trying to connect to the Appium server.
But the Appium server is launching the APP on Android device 1 which is connected to Windows Machine-1.

Both the Windows Machine are connected to same LAN network.

How to run the same on my Android device 2(ZF65TRM) by using the same Appium server. I dont want to run the Appium server on Windows Machine 2.

Logs

Appium v1.22.3 creating new AndroidUiautomator2Driver (v1.70.1) session
[Appium] Applying relaxed security to ‘AndroidUiautomator2Driver’ as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure
[BaseDriver] Creating session with MJSONWP desired capabilities: {
[BaseDriver] “appium:deviceName”: “ZF65TRM”,
[BaseDriver] “appium:udid”: “ZF65TRM”,
[BaseDriver] “platformName”: “Android”,
[BaseDriver] “appium:appPackage”: “iperf.project”,
[BaseDriver] “appium:appActivity”: “IperfProject”,
[BaseDriver] “appium:noReset”: “True”,
[BaseDriver] “appium:remoteAdbHost”: “172.168.1.13”,
[BaseDriver] “appium:ensureWebviewsHavePages”: true,
[BaseDriver] “appium:nativeWebScreenshot”: true,
[BaseDriver] “appium:newCommandTimeout”: 3600,
[BaseDriver] “appium:connectHardwareKeyboard”: true
[BaseDriver] }
[BaseDriver] The following capabilities were provided, but are not recognized by Appium:
[BaseDriver] appium:deviceName
[BaseDriver] appium:udid
[BaseDriver] appium:appPackage
[BaseDriver] appium:appActivity
[BaseDriver] appium:noReset
[BaseDriver] appium:remoteAdbHost
[BaseDriver] appium:ensureWebviewsHavePages
[BaseDriver] appium:nativeWebScreenshot
[BaseDriver] appium:newCommandTimeout
[BaseDriver] appium:connectHardwareKeyboard
[BaseDriver] Session created with session id: 2283d5da-08b9-4d4f-bc1e-77b1ab9ec26b
[UiAutomator2] Neither ‘app’ nor ‘appPackage’ was set. Starting UiAutomator2 without the target application
[ADB] Using ‘adb.exe’ from ‘C:\Users\Downloads\build-tools_r30-rc1-windows\33.0.0\adb.exe’
[ADB] Running ‘C:\Users\Downloads\build-tools_r30-rc1-windows\33.0.0\adb.exe -P 5037 start-server’
[AndroidDriver] Retrieving device list
[ADB] Trying to find a connected android device
[ADB] Getting connected devices
[ADB] Connected devices: [{“udid”:“ONVCQOJRWV8CY”,“state”:“device”},{“udid”:“R5CRBY9L”,“state”:“device”}]
[AndroidDriver] Using device: ONVCQOJRWV8CY

Move the device you want to use to Windows Machine 1. That’s where the Appium server is running.

Hi @wreed,
I don’t want to move the device.
Actually, I want to test with 20 devices. 5 devices per windows machine. In future, we will increase the test devices as well may be upto 100+ devices.

Whether it is possible to test with server running only on Windows Machine-1 and my devices on another windows machine?

If not, will Selenium Grid concept be helpful for my usecase instead of running server on each windows machine?

You can’t run Appium on a device it can’t reach.

I think the Selenium Grid approach is a good one. Keep in mind that this means running an Appium server on each of the computers that host devices.

Here is a tutorial on Selenium Grid:

Also, one more question. Incase of selenium grid, will I be able to test the app both in sequential and parallel way or it is only done through parallel process.

I want to launch my app device by device. Is this possible through Selenium Grid approach? If yes, can you share some documentation on this

This is actually beyond my knowledge. Never tried anything like that.

Thank you for the support.