robot/

directory
v1.7.0-dev-20190911 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2019 License: Apache-2.0

README

Robot - automated integration testing system.

Components

Master

The master is a process that controls the entire, distributed Robot system.

The master is the main coordination point, all other service are discovered through the master. It's main job is to manage and control the set of satellites. A satellite is a server that offers any of the other robot services.

A master instance can be started with:

./do run robot start master

By default, this verb will also start a local satellite for locally attached devices.

Satellite

An instance running on a host machine (Windows / MacOS / Linux) that connects to a master and runs workers.

A satellite instance can be started with:

./do run robot start worker

TODO: Rename verb or satellite!

Worker

A worker runs on a satellite and executes task for a given target device.

Trace, Report, Replay are all workers.

Package

A package is a zip file containing GAPID build artifacts (gapis, gapir, etc.)

A package can be complete (as in it contains binaries for all hosts, all Android ABIs), or sparse. Obviously Robot will only be able to execute tasks on devices it has binaries for.

Packages can be uploaded to the master with:

./do run robot upload

or with

./do upload

TODO:

./do upload is supposed to generate the .zip for you, but it seems this functionality was removed by this CL.

We need some way of regenerating the zip files, locally and on the build machines.

The layout for a package much match the expected layout in test/robot/build/artifact.go.

Subject

A subject is a tracable application (currently only APKs are supported).

They can be uploaded to the master with:

./do upload subject

Tracks

A track is a sequence of packages, usually ordered by changelist SHA. There doesn't however need to be a 1:1 package <-> CL mapping in a track. This allows a track to have entries for Gerrit-style patch-sets.

There can be multiple tracks and each track has a HEAD package which allows for track forking, much like branches in a git repository.

Running guide

  • Craft a package zip file (see above).
  • Attach an Android device, make sure it shows up with adb devices.
  • In the terminal type:
./do run robot --log-level verbose start master
./do run robot upload build package.zip
./do run robot upload subject my-app.apk

Directories

Path Synopsis
Package build holds build package and artifact managment for robot.
Package build holds build package and artifact managment for robot.
job
Package job holds code for managing task execution in robot.
Package job holds code for managing task execution in robot.
worker
Package worker is a set of helpers for implementing common features of robot workers (see package job for more information about what a worker is).
Package worker is a set of helpers for implementing common features of robot workers (see package job for more information about what a worker is).
generator
Package generator provides the functionality used by the lingo command to add generated parser functionality based on syntactically correct go code.
Package generator provides the functionality used by the lingo command to add generated parser functionality based on syntactically correct go code.
Package master holds the code for a master in the robot system.
Package master holds the code for a master in the robot system.
Package monitor is a helper for keeping a local in memory representation of the key data from some of the robot services.
Package monitor is a helper for keeping a local in memory representation of the key data from some of the robot services.
Package record provides funcitonality for sequential storage of types in a variety of serialization formats.
Package record provides funcitonality for sequential storage of types in a variety of serialization formats.
Package replay holds the functionality used to do device replay and comparison video generation for robot.
Package replay holds the functionality used to do device replay and comparison video generation for robot.
Package report holds the functionality for running trace reports and verifying correctness of a trace in the robot system.
Package report holds the functionality for running trace reports and verifying correctness of a trace in the robot system.
Package scheduler holds the main task scheculing for the robot system.
Package scheduler holds the main task scheculing for the robot system.
Package search holds the structures needed to support a generalised query structure suitable for rpc's to a search service.
Package search holds the structures needed to support a generalised query structure suitable for rpc's to a search service.
eval
Package eval supplies logic for automatically applying a search query to a set of records.
Package eval supplies logic for automatically applying a search query to a set of records.
query
Package query contains helpful code for building structured search queries.
Package query contains helpful code for building structured search queries.
script
Package script provides a fairly terse programming language for expressing search queries as strings.
Package script provides a fairly terse programming language for expressing search queries as strings.
Package stash provides the defenition of a service that stores immutable blobs of data keyed by id, and the client helpers for dealing with that service.
Package stash provides the defenition of a service that stores immutable blobs of data keyed by id, and the client helpers for dealing with that service.
grpc
Package grpc provides the client and server support for communicating with a remote stash using grpc.
Package grpc provides the client and server support for communicating with a remote stash using grpc.
local
Package local provides implementations of a stash.Service for local storage.
Package local provides implementations of a stash.Service for local storage.
Package subject holds the code for handling tracable applications in the robot system.
Package subject holds the code for handling tracable applications in the robot system.
Package trace holds the code for taking a capture in the robot system.
Package trace holds the code for taking a capture in the robot system.
web
Package web holds the code for serving the robot web interface.
Package web holds the code for serving the robot web interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL