TapTest
Enables Tap for a test class: one driver session per declared role is opened before each test and closed (with failure artifacts captured first) after it.
Configuration comes from JVM system properties (Gradle: systemProperty(...) on the test task) or TAP_* environment variables:
| Property | Meaning |
|---|---|
tap.serials | serials roles map to, in order from a start device that rotates per test (optional; default any pool device) |
tap.device.<role> | pin a role to one serial (optional) |
tap.artifactsDir | failure artifacts root (default build/tap-artifacts) |
tap.capture | onFailure (default) = Device.capture() every device of a failed test into the artifacts root; off = capture nothing |
tap.acquireTimeoutSeconds | how long to wait for a device another session holds (default 300) |
tap.server | host:port of a running server (default: the one tap start recorded in the state dir) |
tap.token | bearer token for an explicit tap.server (default: the one in the state dir's daemon.json) |
tap.manageDaemon | true = run tap start before the first test and tap stop after the last one if that start created the daemon (default false: a daemon must already be running) |
tap.bin | the tap executable tap.manageDaemon uses (default TAP_BIN or tap on PATH) |
Sessions come from the host server (tap start), which owns ADB, the driver and the machine-wide device pool; the driver APKs ship inside the daemon. Devices are attached per test unless deviceLifetime is DeviceLifetime.PER_CLASS.
Properties
Link copied to clipboard
How long an attached device lives; see DeviceLifetime.