Replay & E2E Testing (Experimental)
Agents use refs for exploration and authoring. Replay scripts are deterministic runs that can be used for E2E testing.
Core model
Two-pass workflow:
- Agent pass: discover and interact with refs (
snapshot->click @e../fill @e..). - Deterministic pass: run recorded
.adscript withreplay.
Record a replay script
Enable recording during a session:
By default, on close, a replay script is written to:
You can also provide a custom output file path:
--save-scriptvalue is treated as a file path.- Parent directories are created automatically when they do not exist.
- For ambiguous bare values, use
--save-script=workflow.ador a path-like value such as./workflow.ad.
Run replay
- Replay reads
.adscripts.
Update stale selectors in replay scripts
When a replay step fails, update can:
- Take a fresh snapshot.
- Resolve a stable replacement target.
- Retry the step.
- Rewrite the failing line in the same
.adfile.
Current update targets:
clickfillgetiswait
replay -u before/after examples
Example 1: stale selector rewritten in place
Example 2: stale ref-based action upgraded to selector form
Use replay -u locally during maintenance, review the rewritten .ad lines, then commit the updated script.
Troubleshooting
- Replay fails after UI/layout changes:
- Run
replay -ulocally and review the rewritten lines.
- Run
- Updating cannot resolve a unique target:
- Re-record that flow (
--save-script) from a fresh exploratory pass.
- Re-record that flow (
- Replay file parse error:
- Validate quoting in
.adlines (unclosed quotes are rejected).
- Validate quoting in
