adb_farm_run
Run instrumented Android tests on Firebase Test Lab: upload app and test APKs, select device models and API levels, and execute tests via authenticated gcloud CLI.
Instructions
Run tests on Firebase Test Lab. Uploads an APK and test APK, executes instrumented tests across specified device models and API levels. Requires gcloud CLI authenticated with a Firebase project.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"appApk": "<appApk>",
"testApk": "<testApk>"
},
"name": "adb_farm_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| appApk | Yes | Path to the app APK file | |
| devices | No | Device specs as 'model=DEVICE,version=API' (e.g., 'model=bluejay,version=33'). Omit for default device. | |
| testApk | Yes | Path to the test/instrumentation APK file | |
| timeout | No | Test timeout passed to gcloud --timeout (e.g., '300s', '10m'). This is the LAB-side timeout. | 300s |
| testTargets | No | Specific test class or method (e.g., 'class com.example.MyTest') | |
| execTimeoutMs | No | Local execFile timeout for the gcloud invocation in ms (1min-60min, default 10min). Y4 fix: bigger device matrices or larger APKs can plausibly exceed the previous hardcoded 10min. | |
| resultsBucket | No | GCS bucket for results (omit for default) |