Automation
Blocks and flows
Write steps once, and group cases that belong together.
Blocks
A block is a reusable set of steps: a sign-in, a checkout, creating a customer. Change it once and every case that uses it changes.
Parameters let one block serve many cases: declare {{plan}} in the block, and each step that uses it passes a value.
Run once is for sign-in. The block runs a single time per run and every case in that run reuses the session, instead of signing in fifty times.
Flows
A flow is an ordered group of cases that run together, each entry carrying its own values. The same case can appear twice with different inputs — which makes a flow a data-driven suite rather than only a play order.
Setup for a run
Two places run steps around your cases:
- Before all — once, before the first case. Signing in belongs here.
- Before each — before every case, for state each one needs.
Both are ordinary steps, and both can use blocks.