Test accounts and shared data
Reliable reruns depend on knowing which account and test data a journey exercises. Use named random.* generators and Mailbox inboxes to keep stable identities across plans, applies, and partial reruns, paired with your application’s own seed or cleanup commands.
Choose a setup path
Section titled “Choose a setup path”| What the journey needs | Where to start |
|---|---|
| A signup address, email code, or magic link | Mailbox plugin |
| Your application’s seed or cleanup command | LocalBash or DockerUbuntu |
| A database check or explicitly enabled setup write | SQL: PostgreSQL and ClickHouse |
| A repeatable random name, number, or expression | Generated values |
Connect the remote mailbox
Section titled “Connect the remote mailbox”The Mailbox plugin authenticates through your reflow login, so it requires no separate binding (Mailbox setup). For CI or a separate team credential, store the token in a private binding and always use the address returned by inbox.address.
Receive a code as an ordinary variable
Section titled “Receive a code as an ordinary variable”Capture the inbox cursor and trigger the email in the same step so stale messages from prior attempts are excluded:
---name: Sign in with an email codeurl: https://your-app.example.comproviders: ui: {use: Browser, binding: site} inbox: Mailbox---
### Choose the account
```rflinbox.address name="signup" -> email```
### Request and enter verification code
```rflopen /loginfill label="Email" ${email}inbox.cursor name="signup" -> beforeclick role=button name="Send code"inbox.capture name="signup" after=${before} from="noreply@" subject="Sign-in code" timeout=30 -> email_bodyinbox.extract text=${email_body} pattern="code is ([0-9]{6})" group=1 -> codefill label="Verification code" ${code}click role=button name="Verify"expect page url~="/account"```See the Mailbox plugin guide for magic links, token bindings, and concurrent inbox names.
Share accounts across flows
Section titled “Share accounts across flows”Export an address or generated identifier from a producer flow and read it through needs and references in consumers (producer and consumer example).
Named generated values and mailbox identities belong to the selected execution group and its current test-data generation. Shared groups agree across devices while device groups stay isolated. Selecting another target in the same group keeps its named data—give each distinct environment its own group. Use distinct Mailbox names for parallel email journeys.
Start with fresh test data
Section titled “Start with fresh test data”reflow resetreflow planreflow apply| Command | Named random.* & Mailbox addresses | Step reuse | Your application DB |
|---|---|---|---|
reflow plan / apply (unchanged) | Preserved | Reuses retained passing evidence | Unchanged |
reflow taint <flow> | Preserved (same email & IDs) | Reruns tainted flow + dependents | Unchanged |
reflow reset | Rotated (new generation; old inboxes stop receiving mail) | Reruns generator & plugin steps + dependents (read-only non-plugin steps stay reusable) | Unchanged (run your own cleanup/seed) |
reflow reset preserves execution history and refuses an owned group or unresolved uncertain outcomes until inspected and reconciled (recover a blocked reset). Changing a generator’s options requires either a new capture name or an explicit reset.
If a reset reply is interrupted, repeat reflow reset to reconcile its retained request identity. If another device has already rotated the group, inspect reflow status --json and pass both --expected-epoch <target.testDataEpoch> and a fresh --idempotency-key <uuid> to rotate again intentionally.
Browser-run mailboxes
Section titled “Browser-run mailboxes”The browser-run mailbox path (${MAILBOX}) has a separate run-scoped lifecycle; see Browser-run mailboxes before mixing it with named plan/apply inboxes.
Seeded accounts and third-party authentication
Section titled “Seeded accounts and third-party authentication”Use your application’s fixture or idempotent setup flow for pre-seeded accounts, keeping credentials in private bindings or input files. Browser context isolation never resets backend records. Third-party OAuth providers can trigger bot detection—a first-party email/password, magic-link, or OTP flow is usually simpler and more reliable in test environments.