Variables and secrets
Anywhere in a test, ${name} is replaced with a value. That’s how one test runs against your laptop and staging, how passwords stay out of your repository, and how parallel tests avoid stepping on each other.
Your own variables
Section titled “Your own variables”vars: email: demo@example.com # every test can use ${email}vars: name: Ada Lovelace # just this teststeps: - fill: textbox "Name" = ${name} - fill: textbox "Email" = ${email}Override any of them for one run: sis run --var email=qa@example.com.
Environment variables
Section titled “Environment variables”url: ${env.BASE_URL} # from the environmenturl: ${env.BASE_URL:-http://localhost:3000} # with a defaultThe usual way to point the same tests at different environments: locally they use the default, in CI you set BASE_URL.
Secrets
Section titled “Secrets”- fill: textbox "Password" = ${secret.PASSWORD}${secret.NAME} is read from the environment, a .env file, or .sisyphus/secrets.env (git-ignored). Its value is masked as ••• in every result, so it never leaks into CI output or an AI agent’s context.
Values from the app
Section titled “Values from the app”set: reads something from the screen into a variable:
- set: order: ${text(heading ~"Order")} items: ${count(list "Cart" >> listitem)}- expect: { equals: ["${items}", "3"] }Available: ${text(<selector>)}, ${value(<selector>)}, ${count(<selector>)}, ${url()}, ${title()}, ${clipboard()}.
Built-in values
Section titled “Built-in values”| Variable | Is |
|---|---|
${random} |
10 random digits, different every time: unique emails, names |
${timestamp} |
the current time |
${worker} |
which parallel worker runs this test (0, 1, …) |
${index} |
the pass number inside repeat |
${os} |
the system the test runs on: macos, windows or linux (steps that differ by OS) |
${project_dir} |
the folder holding sisyphus.yaml, as an absolute path |
${output}, ${exit_code} |
what the last run: command printed, and its exit code |
- fill: textbox "Email" = test-${random}@example.com- Variables can use other variables:
file: out-${id}.txt. $${writes a literal${, for shell variables inrun:commands:echo $${HOME}.- A variable that’s used but never set fails the step with
VARIABLE_UNDEFINED, rather than typing an empty string.
Full list: Variables reference.
