Giter Site home page Giter Site logo

alexsantosdev / gads Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shamanec/gads

0.0 1.0 0.0 12.22 MB

Simple device farm for remote control of devices and Appium test execution on iOS/Android, running on Linux using Docker containers

License: MIT License

Go 29.11% CSS 5.80% HTML 1.61% JavaScript 63.49%

gads's Introduction

Introduction

NB New React based UI - work in progress

Features

  1. Provider logs for debugging TODO in new UI
  2. Authentication
    a. Log in, session expiry
    b. Add users (for admins)
  3. Devices control (most of interaction is wrapped around Appium API)
  • Android
  • iOS
  • Both
    • Basic functionalities - Home, Lock, Unlock, Type text, Clear text
    • Basic remote control - tap, swipe
    • Basic web Appium inspector - see elements tree with info only TODO in new UI
    • Take high quality screenshots
    • Simple logs display - Appium/WebDriverAgent logs when provider is in debug, some simple interaction logs TODO in new UI
    • Reservation - loading a device sets it In use and can't be used by another person until it is released TODO in new UI
    • Appium session refresh mechanism if a session timed out or was closed

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

Setup

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

Go

  1. Install Go version 1.21.0 or higher
  2. Install Node > 16.

Start MongoDB instance - this can be done as provider step as well

The project uses MongoDB for syncing devices info between providers and GADS UI.

Install Docker

  1. You need to have Docker(Docker Desktop on macOS, Windows) installed.

Start a MongoDB container instance

  1. Execute docker 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 ports 27017 for the MongoDB instance.
  2. You can use MongoDB Compass or another tool to access the db if needed.

Setup the GADS UI

Clone the project and the GADS-devices-provider code from both repos.

Setup config.json

  1. Open the config.json file.
  2. Change the gads_host_address value to the IP of the host machine.
  3. Change the gads_port value to the port you wish the service to run on - default is 10000.
  4. Change the mongo_db value to the IP address and port of the MongoDB instance. Example: 192.168.1.2:32771
  5. If you are registering devices to Selenium Grid via providers, you can visualize the grid directly in the UI - change selenium_grid_instance to the instance url, e.g. http://192.168.1.6:4444 and access it via the UI

Build the UI

  1. Open the gads-ui folder in Terminal.
  2. Execute npm install
  3. Execute npm run build

Start the UI and backend service

  1. Open terminal and execute go build . in the main project folder
  2. Execute ./GADS --auth=true
  3. Access the UI on http://{gads_host_address}:{gads_port}

UI development

If you want to work on the UI you need to add a proxy in package.json to point to the Go backend

  1. Open the gads-ui folder.
  2. Open the package-json file.
  3. Add a new field "proxy": "http://192.168.1.28:10000/" providing the host and port of the Go backend service.
  4. Run npm start

Start a provider instance

This is only the UI, to actually have devices available you need to have at least one GADS-devices-provider instance running on the same host(or another host on the same network) that will actually set up and provision the devices. Follow the setup steps in the linked repository to create a provider instance.

Thanks

About
Appium It would be impossible to control the devices remotely without Appium for the control and WebDriverAgent for the iOS screen stream, kudos!

Demo video

Screen.Recording.2023-12-19.at.17.06.06.mov

gads's People

Contributors

shamanec avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.