SmoothDeploy Docs
Tests

Test Parameters

Pass data sets into SmoothDeploy tests and use them inside steps

Use test parameters to run the same flow against multiple data sets without duplicating steps.

When to use parameters

  • Run a test once per record (users, locales, plans)
  • Keep credentials or test data out of the step definition itself
  • Combine with shared steps for data-driven suites

Defining parameters

Open a test, choose Edit, and update the Parameters JSON editor. Provide an array of objects:

[
  {
    "username": "admin@acme.io",
    "password": "{{secrets.LOGIN_PASSWORD}}"
  },
  {
    "username": "viewer@acme.io",
    "password": "{{secrets.LOGIN_PASSWORD}}"
  }
]

Each object becomes one execution of the test. Fields are merged into the global params object before every step.

Referencing inside actions

Any text field rendered with the reference picker supports parameter tokens. Select Parameters in the dropdown (or type manually) to insert {{params.key}}.

{{params.username}}

During Playwright export, SmoothDeploy converts these placeholders into lookups on the generated _PARAMS object, so a fill step becomes:

await page.getByTestId('email').fill(_PARAMS["username"]);

Runtime behavior

  • Parameters are optional; an empty array runs the test once.
  • Invalid JSON in the editor blocks saving, mirroring the UI validation logic.
  • Secrets referenced inside parameter objects resolve at runtime, so no plain-text exposure occurs in generated scripts.

Troubleshooting

  • Ensure every parameter object shares the same keys to avoid undefined lookups.
  • Use the Run locally dialog to inspect substituted values in the previewed Playwright script.