> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.doc-detective.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.doc-detective.com/_mcp/server.

# Step routing

> A single routing entry on a step handler (`onPass`, `onFail`, `onWarning`, `onSkip`): an optional condition (`if`) plus exactly one of `continue`, `stop` (`test`), `retry`, or `goToStep`.

A single routing entry on a step handler (`onPass`, `onFail`, `onWarning`, `onSkip`): an optional condition (`if`) plus exactly one of `continue`, `stop` (`test`), `retry`, or `goToStep`.

## Referenced In

* [Common](/reference/schemas/common)

## Fields

| Field    | Type                                      | Description                                                                                             | Default |
| :------- | :---------------------------------------- | :------------------------------------------------------------------------------------------------------ | :------ |
| if       | one of: - string - array of string        | Optional. A condition expression, or an array of expressions combined with logical AND.                 | —       |
| continue | `true`                                    | Optional. Continue execution with the next step. Use to explicitly suppress a default handler behavior. | —       |
| stop     | string                                    | Optional. Stop the test's remaining steps in this context. Accepted values: `test`                      | —       |
| retry    | object([Retry](/reference/schemas/retry)) | Optional. Retry the current step.                                                                       | —       |
| goToStep | string                                    | Optional. Identifier of the step to jump to, within the same test. Minimum length: 1. Pattern: `\S`     | —       |

## Examples

```json
{
  "continue": true
}
```

```json
{
  "stop": "test"
}
```

```json
{
  "if": [
    "$$platform == linux",
    "$$outputs.exitCode == 0"
  ],
  "goToStep": "verify"
}
```

```json
{
  "retry": {
    "limit": 3,
    "delay": 1000,
    "backoff": "exponential"
  }
}
```

```json
{
  "retry": {
    "limit": 1
  }
}
```