Skip to content

Utilities

Inputsmin, max (numbers), seed
Outputsresult
opReturns
intAn integer between min and max
floatA float
stringA string of length characters
booleanA boolean
pickAn element drawn from items

The seed field (a number or a string) makes the draw deterministic: that is what gives you varied data but a reproducible test. It is the essential difference from the {{$random…}} helpers, which are never reproducible.

Inputsvalue, schema (string)
Outputsvalid, invalid, errors
Configurationschema — a JSON Schema, in draft-07, 2019-09 or 2020-12

The tool of choice for checking that a response honours its contract. Wire errors onto a Log: the output details every violation, which makes a CI failure directly actionable.

Requête HTTP ──response[body]──► Validation schéma
├─ valid ──► (suite)
├─ invalid ──► Throw
└─ errors ──► Log
Inputspath (string)
Outputscontent (string)
Configurationpath — absolute, or relative to the open .restorm file

The relative path is what you should use so that the scenario stays portable between your machine and CI.

Inputspath (string), content
Outputsnone
Configurationpath, mode: replace (default) or append
Inputsmessage (string), data
Outputsnone
Configurationlevel: debug, info, warn, error

This is the traceability box. Its entries are the only ones shown by default in the execution log and on the command line’s output — the engine’s entries are only added with --all-logs.

In other words: what you write with Log is what you will find again in your CI’s artefacts.

Inputsa (the observed value), b (the expected value), message (string)
Outputsthen (success), else (failure)
Configurationoperator, a, b, message

Available operators:

eq · ne · lt · lte · gt · gte · contains · isString · isNumber · isBoolean · isArray · isObject · isNull · exists · isEmpty · matchesRegex · isOneOf · deepEquals · lengthEq · lengthGt · lengthLt

The message field is what will make a failure comprehensible in the log: write there what was expected, not “error”.

Inputsmessage (string)
Outputsnone — this box has no done port
Configurationmessage

Fails the run deliberately. That is what gives you exit code 1 in CI: wire it onto the else output of your critical assertions or onto a schema validation’s invalid.