Skip to navigation

Common

Referenced In

Fields

FieldTypeDescriptionDefault
$schemastringOptional. JSON Schema for this object.

Accepted values: https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json
—
stepIdstringOptional. ID of the step.—
descriptionstringOptional. Description of the step.—
unsafebooleanOptional. Whether or not the step may be unsafe. Unsafe steps may perform actions that could modify the system or environment in unexpected ways. Unsafe steps are only performed within Docker containers or if unsafe steps are enabled with the allowUnsafeSteps config property or the --allow-unsafe flag.false
outputsobjectOptional. Outputs from step processes and user-defined expressions. Use the outputs object to reference outputs in subsequent steps. If a user-defined output matches the key for a step-defined output, the user-defined output takes precedence.{}
variablesobjectOptional. Environment variables to set from user-defined expressions.{}
breakpointbooleanOptional. Whether or not this step should act as a breakpoint when debugging is enabled. When true, execution will pause at this step when debug mode is enabled.false
ifone of:
- string
- array of string
Optional. A condition expression, or an array of expressions combined with logical AND.—
assertionsone of:
- one of:
- string
- array of string
- array of object(assertion)
Optional. Assertions for this step. As authored input, a custom condition expression (or array of expressions, combined with logical AND). In a test result, the runner replaces this with the array of articulated assertion records it evaluated (implicit then custom).—
onPassarray of object(routing)Optional. Routing entries evaluated when this step passes. The first entry whose if matches applies. continue, stop, retry, and goToStep are honored at runtime; goToTest is validated but not yet executed.—
onFailarray of object(routing)Optional. Routing entries evaluated when this step fails. The first entry whose if matches applies; the default when none is set stops the test. continue, stop, retry, and goToStep are honored at runtime; goToTest is validated but not yet executed.—
onWarningarray of object(routing)Optional. Routing entries evaluated when this step produces a warning. The first entry whose if matches applies. continue, stop, retry, and goToStep are honored at runtime; goToTest is validated but not yet executed.—
onSkiparray of object(routing)Optional. Routing entries evaluated when this step is skipped (reached but not run — unsafe-blocked or guard-if false). The first entry whose if matches applies. continue, stop, and goToStep are honored at runtime; goToTest is validated but not yet executed. (retry is a no-op here — a step that never ran cannot be re-run.)—
locationobject(Source Location)ReadOnly. Source location where this step was detected in the original file. This is system-populated metadata and should not be set manually.—
autoScreenshotstringReadOnly. Path, relative to the run’s artifact directory (the report’s runDir), of the screenshot captured automatically after this step. Always a non-empty, forward-slash, relative path. Present only in test results, when autoScreenshot is enabled and the capture succeeded. This is system-populated metadata and should not be set manually.

Minimum length: 1. Pattern: `^(?![A-Za-z]:
[\/])[^\]+$`
attemptsintegerReadOnly. Total number of times this step ran (the initial attempt plus retries) when a routing retry action re-ran it. Present only in test results, and only when the step was retried at least once (so the value is always >= 2). This is system-populated metadata and should not be set manually.

Minimum: 2
—
visitintegerReadOnly. Which visit of this step produced this report, when a routing goToStep re-ran it (the first visit omits this field). Present only in test results; system-populated.

Minimum: 2
—
durationMsintegerReadOnly. Wall-clock duration of this step in milliseconds. When a routing retry action re-ran the step, this is the FINAL attempt’s elapsed time — the attempt the reported result describes — not the sum across attempts. A step that was skipped or never executed reports 0. Distinct from the duration input that some actions accept (for example a click’s press duration). Present only in test results; system-populated.

Minimum: 0
—

Examples

{
"$schema": "https://raw.githubusercontent.com/doc-detective/common/refs/heads/main/dist/schemas/step_v3.schema.json",
"stepId": "example",
"description": "example",
"unsafe": false,
"outputs": {},
"variables": {},
"breakpoint": false,
"if": "example",
"assertions": "example",
"onPass": [],
"onFail": [],
"onWarning": [],
"onSkip": []
}