Skip to main content

Best Practices

Organise Workflows by Domain

Group related workflows in a directory structure:
Run all tests in parallel:

Use Config Profiles for Environments

Never hard-code environment URLs or credentials:

Extract Early, Assert Often

Extract values as soon as they become available and assert at every meaningful checkpoint:
This makes failures easy to pinpoint — you know exactly which step broke.

Keep Steps Focused

Each step should do one thing well. Avoid steps with multiple responsibilities:

Use Deterministic Data

Avoid random values that make tests flaky. When you need unique data, use {{ nowUnix }} or a counter:

Use ignore_error Sparingly

ignore_error is useful for cleanup steps or optional checks, but overusing it hides real failures:

Template Sensitive Data

Use variables for secrets and credentials:
Pass them via environment variables or the config file — never hard-code them in workflow files.

Clean Up Test Data

When your workflow creates data, clean it up afterward:

Use call for Reusable Steps

Extract common patterns (auth, setup, teardown) into reusable files:

Version Your Workflows with the Schema

Add the JSON schema reference to get IDE autocomplete:

Run Workflows in CI with --fail-fast

In CI, --fail-fast saves time by stopping at the first failure:

What’s Next?