Skip to content

Variables and scope ​

Flowstride (FS) tests use the .flow extension. FS supports environment interpolation, generated values, extracted state, helper return values and command aliases.

Environment values ​

flow
flow.open "{{env.BASE_URL}}/login";
flow.type "Email" "{{env.TEST_EMAIL}}";
flow.type "Password" "{{env.TEST_PASSWORD}}";

Referenced values must exist. Use shell/CI secrets, .env, or environment profiles. Avoid hardcoding credentials into flows.

Generate once, reuse deliberately ​

flow
flow.type "Email" "$randomEmail@example.test";
flow.type "Confirm email" "@randomEmail@example.test";

$ generates a fresh value and remembers it. @ retrieves that generator's last value. Calling $randomEmail twice generates twice. Retrieval before generation fails. Random generation is the default. Use flow.data.seed for a reproducible sequence of fixture values.

Dynamic variables lists the available generators.

Extract response or UI data ​

flow
flow.extract resBody "user.id" as "userId";
flow.get "/api/users/@userId";
flow.extract attribute "#order" "data-order-id" as "orderId";

Local extracted variables remain available to later scenarios in the same file and reset at the next file. Browser profiles isolate browser storage, not the file's runner variables; use distinct variable names for different users. To explicitly share within a process:

flow
flow.extract resBody "id" as global "customerId";
flow.get "/api/customers/@global[customerId]";

Globals are not a cross-process bus for parallel workers. Prefer independent setup for parallel files. Unknown custom local names can remain literal strings, so a downstream assertion should verify the value you expected to extract.

Use property and network extraction for typed browser or captured network data. Fixture loading and data rows let you reference fields such as @customer.name or @case.city.

Capture a helper result ​

Use flow.call generateEmail() as "signupEmail" to save a JS or TS helper's result, then read it as @signupEmail. A local result remains available to later scenarios in the same file. Use as global "signupEmail" and @global[signupEmail] when another flow in the same worker process needs the value. Use a handoff for dependencies across files and workers. Helpers and scope, Fixtures and handoffs

Aliases register actions ​

flow
Feature: Game smoke test
let game = "flowstride:game"

Scenario: A score changes

Given "The game is open"
  flow.open "/";

When "The player taps"
  game.tap {
    "canvas": "#game",
    "x": 0.5,
    "y": 0.5
  }

Then "The score is one"
  game.expectState {
    "path": "score",
    "equals": 1
  }

Feature aliases apply to its scenarios. A scenario can also declare its own alias. Custom aliases point at a project-local plugin; see plugins.

Reuse data across pages ​

flow
flow.extract text "table[0] tr[6] td[0]" as "petName";
flow.open "/booking/quote";
flow.type input "First Name" "@petName";
flow.assert.that {
  "selector": "input[name='firstName']",
  "condition": "value",
  "value": "@petName"
};

Adapt the table coordinate, route and input to your application. Extraction retains the value while navigation changes the page. The assertion proves the destination received it. Table and cell workflows covers stable record selection and cell-scoped actions.

Interpolation boundaries ​

Workers resolve string values inside command objects and arrays; JSON property names are not interpolated. The configuration loader applies selected overrides such as BASE_URL rather than performing the same substitution through every JSON field. Put supported environment-valued browser credentials in a native profile command.

Flowstride is MIT licensed. Flowstride Cloud offers free and paid workspace plans.