Skip to content

Reusing steps with flows

A flow is a list of steps with a name and parameters, like a function. Tests call: it. When the sign-in page changes, you fix the flow, and every test that signs in is fixed.

A flow is a .sis.yaml file with flow: instead of name:. By convention they live in flows/:

flows/login.sis.yaml
sisyphus: 1
flow: login
params: [email, password]
steps:
- fill: textbox "Email" = ${email}
- fill: textbox "Password" = ${password}
- click: button "Sign in"
- expect: heading "My todos"

End a flow with a check that it worked (here, the heading after signing in). Then a broken sign-in fails at the flow, with a clear message, rather than three steps later somewhere confusing.

steps:
- call: login
with:
email: ada@example.com
password: ${secret.PASSWORD}
- click: button "New todo"

If a step inside a flow fails, the result shows the flow’s file and line, and the test’s step that called it.

A flow’s vars: are defaults for its parameters, so callers can leave them out:

flow: login
params: [email, password]
vars:
email: demo@example.com
- call: login
with: { password: "${secret.PASSWORD}" }

If every test of an app starts by signing in, put the call on the app instead of in each test:

sisyphus.yaml
apps:
web:
url: http://localhost:3000
setup:
- call: login
with: { password: "${secret.PASSWORD}" }

A test that must start signed out sets app_setup: false. If only some tests need it, define a second app with the same URL plus the setup (say web-signed-in), and let tests pick.

sis validate notices when a test repeats a flow’s steps (three or more in a row) and suggests the call:. In Studio, the hint has a one-click fix, and Extract into a flow on a step moves selected steps into a new flow and replaces them with a call. The Flows tab shows each flow and which tests use it.

Flows are how tests share steps. Don’t make one test depend on another having run first: each test calls the flows it needs and stands alone. See Writing good tests.

Made by Bussin Bytes© 2026 Bussin Bytes Ltd · sisyphus.bussinbytes.io