Add steps
1
Write the steps and the expectations
Each quoted argument is one step. This check opens a bookmark in Firefox for iOS and expects the page to load. Write each expectation so it holds only after the steps:Mobster reads the key from
ANTHROPIC_API_KEY or OPENAI_API_KEY, or from the file --env-file names.2
Read the verdict
It prints the verdict, one line per expectation, the report and the command that runs the check again. The exit code is the verdict.With no key set, it stops before it starts a simulator and exits 3:
needs_review: it doesn’t show that the flow works.
The steps run on Claude whenever an Anthropic key is set, and on OpenAI with an OpenAI key alone or with
MOBSTER_SMART_PROVIDER=openai. MOBSTER_SMART_MODEL picks another model, and then only that provider’s key will do. The run sends each screen’s image and accessibility text to that provider. Launch-only and key-less runs send nothing anywhere.
Save the check
Add--save NAME to any run to keep its check as .mobster/checks/NAME.yaml. The command above with --save mozilla-bookmark prints Saved .mobster/checks/mozilla-bookmark.yaml before the verdict.
When the run passes, Mobster also keeps the steps Smart took, and the Saved line says how many of them mobster test replays with no model and no key. Text Smart made up, rather than text your steps spell out, needs Smart on each run. A run that doesn’t pass still saves the check, and its first mobster test runs Smart. A run of a check file (--check) records nothing.
The file’s first line names the check’s JSON Schema:
.mobster/checks/mozilla-bookmark.yaml
Use the verdict in a script
The exit code is the verdict:
With
--json, or when stdout isn’t a terminal, stdout carries one JSON object, the result. Progress goes to stderr. Branch on the exit code and read the result with jq:
check.sh
sh check.sh takes the last branch, exits 1 and prints:
Next
Run every check
mobster test: simulators and your iPhone, retries, flaky checks, JUnit and HTML.Checks reference
The check file, every assertion and the verdict rules.
When a check couldn't run
Each
reason.class and its fix.