Explore and propose tests
An agent can explore your app and draft tests, but a test enters your suite only after a person accepts the claim it makes. Exploring finds out what the app does. Only you know what it should do: a broken button explored the same way gives a test that passes on the broken behavior.
geppetto explore ──> exploration.json: what each probe changed, and problems that need no spec
agent ──> geppetto-proposed/<name>/test.json + proposal.json (the claim)
geppetto propose check <name> ──> gates: red before green, control run, wrong target, repeat
you ──> geppetto propose accept <name> ──> geppetto-tests/<name>.json
Both explore and propose check start the app themselves (--app and
--runtime, as geppetto run --app) and use a new app for every run, so no run
inherits what an earlier one did. The app needs the Geppetto package with stable
target IDs and state providers: explore aims at targets and reads state. Both
commands drive input, so they need a licence key, an indie declaration or the
trial, like geppetto run.
Explore
geppetto explore --app YourApp.app --runtime puppetxr.json \
--app-arg=-logFile --app-arg=player.log --app-log player.log
Explore first starts the app once to read its targets, actions and state. It
then probes every active target that has a stable ID and geometry, one probe per
new app: aim the right hand at the target, click (or, with
--interaction pinch_tap, pinch with a tracked hand), wait --settle-frames.
Each probe runs through the ordinary runner, with single-pulse input, release on
every exit path and a receipt. A probe asserts nothing, so its receipt is never
a pass.
For each probe, geppetto-runs/<time>/exploration.json records:
state_changes: each state value that changed, was added or was removed, by provider and path, the wayexpect: statereads itlog_linesanderror_lines: what the app logged during the probe (with--app-log; without it the log is reported as unavailable)status:ran,error(with what went wrong) orapp_stopped
findings lists only problems that need no spec to recognise:
| Kind | Means |
|---|---|
error_in_log |
An exception, assertion failure or error line after a probe |
app_stopped |
The app exited or stopped answering after a probe |
target_unreachable |
An active target could not be aimed at |
target_without_geometry |
A target reports active but has no geometry |
state_provider_error |
A state provider started failing after a probe |
"Changed nothing" is reported as a fact, not a finding: a disabled button is
meant to do nothing. Targets with generated IDs are listed in skipped_targets,
because no test could name them.
| Option | Default | Does |
|---|---|---|
--interaction click\|pinch_tap |
click |
How to probe; repeat it for both |
--fixture ACTION |
none | An app action run before each probe to reach a starting state; never one that changes project files |
--depth 1\|2 |
1 |
2 also probes every target after each probe that changed state |
--max-probes N |
20 |
Stops after this many probes |
--max-seconds S |
600 |
Starts no probe after this long |
--settle-frames N |
30 |
Frames to wait after each interaction |
Exit code: 0 explored with no findings, 1 with findings, 2 an error.
Propose
A proposal is a folder in geppetto-proposed/, next to your test folder and
never inside it: geppetto run geppetto-tests/ searches subfolders, so a
proposal inside it would run as part of the suite.
geppetto-proposed/
play-loads-level-1/
test.json an ordinary test, valid under geppetto validate
proposal.json the claim
gates/ written by geppetto propose check
{
"claim": "Pressing Play in the main menu loads level 1",
"basis": "observed",
"source": {"exploration": "geppetto-runs/20261130T101500Z/exploration.json", "probe": 1},
"author": "agent"
}
claim is one sentence a person can check without reading the test. basis
is observed (seen while exploring) or specified, which also needs spec:
the requirement, ticket or document the claim comes from. source and
author are optional. Unknown fields are refused.
Check
geppetto propose check play-loads-level-1 --app YourApp.app --runtime puppetxr.json
The gates run in order, each run in a new app, and stop at the first that fails:
- valid: the test validates with no warnings.
- red before green: every state expectation after the first interaction
uses
changed_from, or the same value is checked differently before the input. Something after the last interaction must also show it reached the app: a state expectation, or a log line that must appear. - repeat: the test passes three runs in a row.
- control: each interaction replaced by a wait as long. The test must now fail. A test that passes without its input proves nothing about the input.
- wrong target: aimed at another active target before its last interaction, the test must fail. This catches expectations any click would satisfy. Not applicable when the test aims at no target or the app shows no other one.
Results go to gates/latest.json with the hashes of test.json and
proposal.json, and the receipts to gates/<time>/. Editing either file makes
the result stale. Exit code: 0 every gate passed, 1 a gate failed, 2 a
run errored.
The gates show the test depends on its interaction. They cannot show the claim is right.
Accept, reject, list
geppetto propose accept play-loads-level-1
geppetto propose reject play-loads-level-1 --reason "Play should open the level picker"
geppetto propose list
accept only works with a person at a terminal: it refuses when standard input
or output is not a terminal, so CI or an agent cannot accept. It shows the
claim, warns when the basis is observed, lists the steps in plain language,
the gate results and the screenshots of the last passing run, and asks you to
type the proposal's name. It refuses when the gates have not passed for the
current files, when the test already exists in the suite (--suite, default
geppetto-tests) or when the proposals folder is inside the suite. On
acceptance it copies test.json to geppetto-tests/<name>.json and appends
who accepted it, when, the claim and the hashes to
geppetto-proposed/accepted.jsonl.
reject appends the reason to geppetto-proposed/rejected.jsonl, so the same
claim is not proposed again. list shows each proposal with its basis, gate
state (passed, failed, stale or unchecked) and decision.