Troupeby AliveDocsSign in

Troupe Cloud

Test runs

A cloud test run splits one troupe test suite into shards, runs each shard beside its own hosted devices, and reports them as one run. This page describes that model and what to use until it is offered.

What to use today

  • Run the suite yourself. troupe test runs on your Mac and on a macOS CI runner, where the runtime runs inside the test process. --shard splits a suite over several runners and troupe merge-reports joins their reports. See running in CI.
  • Build in the cloud, test where you like. A cloud build gives you an artifact to download and hand to your own run.
  • Drive a hosted device from a script. Device sessions take the same procedures a test uses, through the client.

The model

A run belongs to a project and is described by one request:

FieldMeaningBounds
suiteThe test suite, uploaded as one gzipped tar. The request states its size and SHA-256 and the answer carries a signed upload request64 MiB
deviceThe device spec every device of the run getsA device spec
shardsHow many parts the suite is split into1 to 16; 1 by default
workersHow many devices each shard drives1 to 4; 1 by default
installBuild artifacts to install on every device before its shard startsUp to 5
projects, grepWhich of the suite's projects and tests to runUp to 16 projects
timeoutMsHow long the run may take10 seconds to 3 hours; 30 minutes by default

What happens then:

  1. The run waits for the suite upload, which must arrive within an hour. Troupe computes the upload's SHA-256 itself and starts nothing if it differs from the one you stated.
  2. Each shard runs troupe test --shard=<index>/<total> in a sandbox, apart from the devices.
  3. A shard's workers attach to devices started for that shard, with the spec and the installs of the run. A shard cannot start other devices.
  4. Shards publish their results as they go. The run's status and counts are the sum of its shards'.

Runs and shards share one set of statuses: queued, running, then passed, failed, errored, timedOut or canceled. failed is your tests or your app; errored is infrastructure.

Procedures

ProcedureWhat it does
runs.createStarts a run; needs devices:acquire and runs:report
runs.waitWaits until the run ends or a timeout passes
runs.shardsLists the shards with their status, devices, exit code and counts
runs.cancelEnds the unfinished shards and releases their devices
runs.get, runs.list, runs.eventsRead a run, its tests and its reporter events, as for a local run

The troupe CLI has no command that starts a cloud run.

Limits

LimitValue
Shards running at onceThe test_shards limit: see limits
Runs waiting for their suite upload8 in a project, 32 in an organization
MeteredEach shard's running time, as test_run_seconds, and its devices' time, as device_seconds

In the web app

A project's page has a Test runs list, and a run's page shows its summary, its shards and each test's outcome, with Cancel while it runs. The web app does not start runs.

Next

esc

    Type to search every page, the protocol reference and the cloud API.