Skip to content
/ GADS Public

Simple device farm for remote control of devices and Appium test execution on iOS/Android

License

Notifications You must be signed in to change notification settings

shamanec/GADS

Repository files navigation

Intro

GADS is an application for remote control and Appium test execution on mobile devices

The app consists of two main components -hubandprovider
The role of thehubis to serve a web interface for the remote control of devices and provider management, as well as act as proxy for providers.
The role of theprovideris to set up and provide the mobile devices for remote control/testing
Supports both Android and iOS devices
Supports Linux, macOS and Windows - notes below

Features

Hub features

  • Web interface
    • Authentication
      • Login, session expiry
      • Add users (for admins)
    • Devices control (most of interaction is wrapped around Appium APIs)
      • Live video
        • NBVideos are essentially MJPEG streams so they are very bandwidth hungry
      • Basic remote control - tap, swipe, touch&hold, home, lock, unlock, type text to active element, get clipboard
      • Install/Uninstall apps
      • Take high quality screenshots
      • Reservation - loading a device sets itIn useand can't be used by another person until it is released
  • Backend
    • Serving the web interface
    • Proxy the communication to the provider instances
    • Experimental Appium grid replacement for Selenium Grid
      • Integrated with UI to reserve devices currently running Appium tests

Provider features

  • Straightforward dependencies setup
  • Devices administration via the hub UI
  • Automatic provisioning when registered devices are connected
    • Dependencies automatically installed on devices
    • Appium server set up and started for each device
  • Remote control APIs for the hub
    • iOS MJPEG video stream usingWebDriverAgent
    • Android MJPEG video stream usingGADS-Android-stream
    • Interaction wrapped around Appium - tap, swipe, touch&hold, type text, lock and unlock device, get clipboard
  • Appium test execution - each device has its Appium server proxied on a provider endpoint for easier access
  • Optionally Selenium Grid 4 nodes can be registered for each device Appium server
  • macOS
    • Supports both Android / iOS
  • Linux
    • Supports both Android / iOS < 17 && iOS >= 17.4
    • Has some limitations to Appium execution with iOS devices due to actual Xcode tools being unavailable on Linux
  • Windows 10
    • Supports Android / iOS < 17 && ios >= 17.4
    • Has some limitations to Appium execution with iOS devices due to actual Xcode tools being unavailable on Windows

Developed and tested on Ubuntu 18.04 LTS, Ubuntu 20.04 LTS, Windows 10, macOS Ventura 13.5.1

Setup

Currently the project assumes that GADS hub, device providers, MongoDB and Selenium Grid are on the same network. They can all be on the same machine as well.

  • Download the latest binary for your OS fromreleases.

or build the project from source

  • Clone the project.
  • Open thehub/gads-uifolder in Terminal.
  • Executenpm install
  • Executenpm run build
  • Go back to the main repo folder.
  • Executego build.

Common setup

MongoDB

The project uses MongoDB for storing logs and for synchronization of some data between hub and providers. You can either run MongoDB in a docker container:

  • You need to have Docker(Docker Desktop on macOS, Windows) installed.
  • Executedocker run -d --restart=always --name mongodb -p 27017:27017 mongo:6.0.This will pull the official MongoDB 6.0 image from Docker Hub and start a container binding ports27017for the MongoDB instance.
  • You can use MongoDB Compass or another tool to access the db if needed.

or

  • Start MongoDB instance in the way you prefer

Hub setup

Docs

Provider setup

Docs

Thanks

About
go-ios Many thanks for creating this CLI tool to communicate with iOS devices, perfect for installing/reinstalling and running WebDriverAgentRunner without Xcode
Appium It would be impossible to control the devices remotely without Appium for the control and WebDriverAgent for the iOS screen stream, kudos!

Videos

Start hub

Screen.Recording.2024-07-19.at.14.53.40.mov

Add provider configuration

Screen.Recording.2024-07-19.at.14.55.34.mov

Add devices and start provider

Screen.Recording.2024-07-19.at.15.05.21.mov

Run Appium tests in parallel with TestNG

Screen.Recording.2024-07-19.at.15.10.01.mov

Remote control

ScreenRecording2024-07-19at15.11.46-ezgif -resize-video.1.mov