Skip to content

Remote Execution

Sai Krishna edited this page Sep 2, 2022 · 3 revisions

HUB:

  • System with real devices and simulators that need to be considered for test execution.
  • Create a hub-config.json or any other config file format that Appium supports. Refer here

hub-config.json

{
  "server": {
    "port": 31337,
    "plugin": {
      "device-farm": {
        "platform": "both", //If both android and iOS devices/simulator/emulators needs to be considered
        "remote": ["https://1.1.1.1:4723"] //Add the remote host and port the appium server running in node machine. 
      }
    }
  }
}
  • Run the Appium server with appium-device-farm plugin enabled.
appium server -ka 800 --use-plugins=device-farm --config ./hub-config.json -pa /wd/hub

Node:

  • System with real devices and simulators that need to be considered for test execution.
  • Create a node-config.json or any other config file format that Appium supports. Refer here
{
    "server": {
      "port": 4723,
      "plugin": {
        "device-farm": {
          "platform": "android",
        }
      }
    }
  }

Note: remote attribute should not be present in node-config.

  • Run the Appium server with appium-device-farm plugin enabled in the Node machine.
appium server -ka 800 --use-plugins=device-farm --config ./node-config.json -pa /wd/hub

Dashboard

  • Navigate to the host and port of Hub server from the above example it will be http://localhost:31137/device-farm
  • Dashboard should have device list based on the hub configuration.

Test Execution

  • Point your Appium test execution URL to the Hub endpoint.
Clone this wiki locally