[appium-device-farm-2] — Complete Setup & Configuration Guide for “Appium Device Farm”

Get a step-by-step walkthrough in the video below!
Complete Setup & Configuration Guide for “Appium Device Farm”
In this article, we’ll walk through a comprehensive, step-by-step Setup and Configuration Guide for Appium Device Farm, covering the key points listed below.
1. Prerequisites:
Set up all required tools and dependencies before proceeding (Node.js, Appium, Android SDK, etc.).
2. Install the Device Farm Plugin:
Step-by-step guide to installing the @appium/plugin-device-farm.
3. Launch Appium Server with Device Farm Plugin:
Start the Appium server using the appropriate flags to enable the Device Farm plugin.
4. Command Breakdown:
Detailed explanation of each part of the Appium server start command.
5. Verify Auto-Connection of Devices (Before/After Server Launch):
Check how connected devices are automatically detected and registered by the plugin.
6. Explore the Device Farm UI :
Walkthrough of the user interface to manage and interact with connected devices.
7. Quick Overview of the UI Features:
Brief introduction to the main UI components and their functionalities.
What is Appium Device Farm?
Appium Device Farm is an official Appium plugin that manages multiple real or virtual devices and distributes test sessions across them — enabling true parallel execution. It supports both Android and iOS platforms, making it ideal for CI pipelines and large test suites.
Key Features:
- Parallel test execution
- Supports real devices and emulators/simulators
- Easy integration with Appium server
- Configurable through simple JSON files
- Compatible with existing Appium tests
Installation & Setup
1. Prerequisites
- Appium 2.x installed (
npm install -g appium
)

- Java installed

- Node.js & npm

- Android SDK / Xcode (based on platform)
2. Install the Plugin:
appium plugin install --source=npm appium-device-farm
Example:

3. Start Appium Server with Device Farm Plugin
You can use this simple command to start Appium server with Device Farm enabled:
appium server -ka 800 --use-plugins=device-farm -pa /wd/hub --plugin-device-farm-platform=android
Breakdown of command:


Various ways to structure the command:
appium server -ka 800 - use-plugins=device-farm -pa /wd/hub - plugin-device-farm-platform=android
appium -ka 800 - use-plugins=device-farm -pa /wd/hub - plugin-device-farm-platform=android
appium server - keep-alive-timeout 800 - use-plugins=device-farm -pa /wd/hub - plugin-device-farm-platform=android
appium server -ka 800 - use-plugins=device-farm - base-path /wd/hub - plugin-device-farm-platform=android
Example:

Navigation to Device-Farm UI:
Navigate to localhost:4723/device-farm once the appium server is started

Verify Auto-Connection of Devices (Before/After Server Launch):
Device launch/started before server launch.

Device launch/started after server launch.

GitHub Link:
π¬ Explore More! Watch My Latest Videos on YouTube!
Visit My Official Blog:
No comments:
Post a Comment