Giter Club home page Giter Club logo

stf-console-client's Introduction

STF console client

A console client for the Smartphone Test Farm service

Build Status

Download

Latest version

All versions

stf devices

Configuration

  • Download and extract an artifact from "releases" page into some target directory

  • Create file "farm.properties" either in your home directory or in the target app directory

  • Add following properties into the file:

      stf.url=<your_farm_url>/api/v1/
      stf.key=<token created in 'Settings/Keys/Access Tokens' seciton>
      stf.timeout=<farm connection timeout in seconds, eg. 60>
      android_sdk=<path to android sdk directory>
    
  • Optionally, add the app's directory into your PATH environment var

Usage

stf [command] [command options]

Commands:

disconnect      Disconnect from all of currently connected devices
  Usage: disconnect [options]
          Options:
            -s
              Disconnect from the specified devices
              Default: []


devices      Print list of available devices
  Usage: devices [options]
    Options:
      --all
        Show all devices. By default only available devices are returned.
        Default: false
      --my-columns
        <BETA> Use columns from web panel
        Default: false
      -abi
        Filter by device abi architecture
      -api
        Filter by device api level
        Default: 0
      -count
        Filter devices by count
        Default: 0
      -maxApi
        Filter by device max api level
        Default: 0
      -minApi
        Filter by device min api level
        Default: 0
      -name
        Filter devices by its name
      -provider
        Filter devices by provider
      -serial
        Filter devices by serial number

connect      Connect to devices
  Usage: connect [options]
    Options:
      --all
        Show all devices. By default only available devices are returned.
        Default: false
      --my
        Connect to currently taken devices
        Default: false
      -abi
        Filter by device abi architecture
      -api
        Filter by device api level
        Default: 0
      -count
        Filter devices by count
        Default: 0
      -f
        Read connection params from a file
      -l
        Connect to devices by its indexes from the results of previous
        "devices" command. E.g. "-l 1 2 5"
        Default: []
      -maxApi
        Filter by device max api level
        Default: 0
      -minApi
        Filter by device min api level
        Default: 0
      -name
        Filter devices by its name
      -provider
        Filter devices by provider
      -serial
        Filter devices by serial number
      -u
        Read connection params from an url

Store connection parameters in a file

Connection parameters might be stored as a separate file:

confing.json:
{
  "count": 2,
  "api": 23,
  "names": "nexus5,nexus6",
  "minApi": 21,
  "providers": "~support,autotests",
  "serials": "3a4674bce45644",
  "maxApi": 26,
  "abi": "arm"
}

usage: stf connect -f config.json
       stf connect -u http://sample.com/params.json

All fields are optional. For the "providers", "serials" and "names" fields the ~ sign might be used to inverse filter. E.g config with parameter

"providers": "~support,autotests"

means 'use all available devices except the ones which belongs to the "support" and "autotests" groups'.

stf-console-client's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

stf-console-client's Issues

introduce connection timeout

sometimes stf client stucks on attempt to connect the device. It's probably some stf farm issue but we need some reasonable timeout for connection after which next device should be connected.

it's might be useful to have this timeout as parameter

`client disconnect` disconnects all the devices reserved by particular farm account

client disconnects all devices reserved by particular farm account, even those which weren't linked by "this" client connect

subj is crucial for CI system because due to particular adb token can be linked with only one farm account so concurrent builds / jobs will affect each other. If one job disconnect all another will lose all the devices during build run

Add more information about devices

Many devices have name :
./open-stf-console-client.sh -l
abi: armeabi-v7a serial: 2f96e4e2, sdk: 23
abi: arm64-v8a serial: 05157df591030e3a, sdk: 23
abi: armeabi-v7a serial: 44c1be6e, sdk: 19
Nexus 5 abi: armeabi-v7a serial: 064b2b050adf279b, sdk: 23
abi: armeabi-v7a serial: 420366cce4b15200, sdk: 19
Xperia Z2 Tablet abi: armeabi-v7a serial: CB5128094L, sdk: 23
abi: armeabi-v7a serial: LGD72434524e22, sdk: 21
Nexus 9 abi: arm64-v8a serial: HT4CVWV00329, sdk: 25
abi: armeabi-v7a serial: YT9110DWHZ, sdk: 19
abi: x86 serial: EBAZCY27A405, sdk: 19
Nexus 6P abi: arm64-v8a serial: ENU7N15B14007999, sdk: 25
Nexus 6 abi: armeabi-v7a serial: ZX1G428NHF, sdk: 23
abi: arm64-v8a serial: 81HBBMT228AV, sdk: 22
abi: armeabi-v7a serial: N9JILXNHCF, sdk: 19
abi: armeabi-v7a serial: MVGEKV4T49Z9BA6D, sdk: 19
abi: armeabi-v7a serial: b0efb6d9, sdk: 21
abi: armeabi-v7a serial: R32CB01XN5B, sdk: 19
Nexus 6P abi: arm64-v8a serial: ENU7N15B06000967, sdk: 25
abi: arm64-v8a serial: RQ30036Z8F, sdk: 23

So we need more information and possibility to filter by them, manufacturer and model for example.

add logging

in order to determine on which side issues occurs please add logging system. Suggest to force logging with command line parameter with specifying log file e.g. stf connect --log logs/error.log

Add possibility to release devices from farm

Currently there is no way to release device from farm. Even if device was disconnected via adb status 'automation' persist. Don't know if there is some release timeout and how big it is.

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.