Skip to navigation

routing

A single dynamic-routing entry: an optional condition (if) plus exactly one routing action. Attached to a step or test handler (onPass, onFail, onWarning, onSkip). For step-level handlers, continue, stop, retry, and goToStep are evaluated at runtime; goToTest is validated but not yet executed (deferred at step scope). For test-level handlers, continue, stop, and goToTest are evaluated at runtime (test scope; goToTest jumps to a test within the spec), while retry and goToStep are not applicable at test scope.

Referenced In

Fields

FieldTypeDescriptionDefault
ifone of:
- string
- array of string
Optional. A condition expression, or an array of expressions combined with logical AND.—
continuetrueOptional. Continue execution with the next step. Use to explicitly suppress a default handler behavior.—
stopstringOptional. Stop execution at the given scope.

Accepted values: test, spec, run
—
retryobject(Retry)Optional. Retry the current step.—
goToStepstringOptional. Identifier of the step to jump to.

Minimum length: 1. Pattern: \S
—
goToTeststringOptional. Identifier of the test to jump to.

Minimum length: 1. Pattern: \S
—

Examples

{
"continue": true
}
{
"stop": "test"
}
{
"if": "$$platform == windows",
"goToTest": "cleanup"
}
{
"if": [
"$$platform == linux",
"$$outputs.exitCode == 0"
],
"goToStep": "verify"
}
{
"retry": {
"limit": 3,
"delay": 1000,
"backoff": "exponential"
}
}
{
"retry": {
"limit": 1
}
}