Shell Command
Runs one shell command on the phone and hands what it printed to the steps after it. Android only — iOS has no device shell.
Run a shell command on the device and pass what it printed to the next steps — package lists, dumpsys, settings, file checks. Android only: iOS has no device shell.
Reach for it when
- Reading state no screen shows: installed packages, battery detail, a settings value, whether a file is there.
- Setting something up before the UI part of the test starts.
Every setting this block has. A field marked only when appears once you have chosen the mode above it — those are alternatives to each other, not extra things to fill in.
- CommandRequiredstarts at —
Runs through the device's own sh, so pipes, && and redirects work — e.g. pm list packages -3, dumpsys battery, settings get global airplane_mode_on.
- Timeoutstarts at 20s
Give up if the command hasn't finished by then. This is billed device time.
- Fail on non-zero exitstarts at on
Treat a non-zero exit code as a failed step. Turn off when a non-zero result is a legitimate answer (grep finding nothing) — the code is still reported as {{ $Shell Command.json.exitCode }}.
Write the command
It goes through the device's own sh, so pipes, && and redirects all work.
Shell CommandSettings CommandRuns through the device's shpm list packages -3TimeoutThis is billed device time20sFail on non-zero exitonRead what it printed
stdout → the next step Decide whether a non-zero exit is a failure
Turn Fail on non-zero exit off when a non-zero answer is legitimate — grep finding nothing, for instance. The code is still readable as {{ $Shell Command.json.exitCode }}.
Shell CommandIf / Branch
- What the command printed, and its exit code.
- Android only — and on an iPhone the step FAILS rather than being skipped, because Apple’s sandbox has no adb equivalent to fall back to. In a mixed Android/iOS run, keep it on an Android-only branch.
- The timeout is device time you are paying for. A command that hangs costs the full 20 seconds every run.