Skip to navigation

assertion

An articulated assertion record produced by the runner for a step result. Each record names a single verification check, whether it passed, and the values it compared. The step’s result is the roll-up of its assertion results (FAIL > WARNING > all-SKIPPED > PASS). System-populated; appears in test results, not in authored specs.

Referenced In

Fields

FieldTypeDescriptionDefault
statementstringRequired. Human-readable articulation of the check, e.g. exitCode in [0].

Minimum length: 1. Pattern: \S
—
sourcestringRequired. Who defined the assertion: implicit (runner-defined) or custom (user-defined).

Accepted values: implicit, custom
—
resultstringRequired. Outcome of evaluating the assertion.

Accepted values: PASS, FAIL, WARNING, SKIPPED
—

Examples

{
"statement": "exitCode in [0]",
"source": "implicit",
"result": "PASS"
}
{
"statement": "exitCode in [0]",
"source": "implicit",
"result": "FAIL"
}
{
"statement": "saved-file variation <= 0.1",
"source": "implicit",
"result": "WARNING"
}
{
"statement": "$$outputs.exitCode == 0",
"source": "custom",
"result": "SKIPPED"
}