Random values
DrevOps\BehatSteps\Steps\Web\RandomTrait - Source, Example, Helpers
Replace random-value tokens in step arguments and table cells.
- Resolve
[?<name>:<type>[,<args>]]tokens to generated values.- Return 1 value per token for the whole scenario.
Built-in types are
string,name,machine_name,int,uuid. The default isstringwith length10, so[?title],[?title:string]and[?title:string,10]share 1 value.
Operates on Gherkin text alone: no Mink session and no backend, so the trait works in any suite.
Skip processing with tag:@behat-steps-skip:RandomTrait.
Options
| Option | Type | Default | Tag | Description |
|---|---|---|---|---|
random.enabled | boolean | TRUE | @behat-steps-skip:RandomTrait | Replace [?name:type] tokens in step arguments and table cells. Turn it off to pass a token through to a step untouched. |