Skip to main content
Reliant provides two levels of workflow testing: static validation catches structural problems in your workflow definition, and scenario testing verifies runtime behavior with simulated events. Together, they ensure your workflows are both well-formed and behave correctly.

Static Validation

Reliant validates every workflow when it’s loaded. This catches structural problems before your workflow ever runs.

What Gets Validated

Static validation checks for:
  • Entry point validity: Every node listed in entry must exist in the workflow
  • Node references: Edges can’t reference non-existent node IDs
  • Input completeness: Every input must have either a default value or required: true
  • Loop structure: Loop nodes must have either a workflow reference or an inline definition
  • Edge consistency: Edge targets must be valid node IDs within the workflow
  • Reserved names: Input groups can’t use reserved names like default
  • CEL expression syntax: Template expressions and conditions are checked for valid syntax

Common Validation Errors

Static validation runs automatically—there’s no separate command to invoke it. If your workflow has validation errors, Reliant reports them when loading the workflow and it won’t appear in the workflow picker. You can also trigger validation explicitly using the validate_workflow tool in the workflow builder, which is useful when iterating on a workflow definition.

When Static Validation Isn’t Enough

Static validation confirms your workflow is structurally sound, but it can’t tell you whether the workflow actually does what you intend. A workflow can pass all validation checks and still route to the wrong node, loop forever, or produce unexpected outputs. That’s where scenario testing comes in.

Scenario Testing

Scenario testing lets you verify workflow runtime behavior without running real LLM calls or tool executions. You define simulated events—mocked LLM responses and tool results—then assert expected outcomes like which nodes were reached, what outputs were produced, and whether the workflow completed successfully.

How It Works

The scenario simulator executes your workflow’s node graph, but instead of calling real activities, it uses your mocked events to produce node outputs. It follows the same edge routing, condition evaluation, and loop logic as the real executor.

Scenario Structure

A scenario YAML file defines:

Event Types

Event Fields

Targeting Nodes

By default, events are consumed sequentially — the first triggered node gets the first event, and so on. Use the node field to target a specific node:
Multiple events for the same node are consumed in order each time that node is triggered.

Inner Nodes (Loops and Sub-Workflows)

For workflows with inline loops or inline sub-workflows using type: workflow with inline:, you can target individual nodes inside them using dot-separated qualified IDs:
The same dot-notation works for inline workflow nodes:
For nested structures, chain the IDs:

How inline simulation works

For inline loops with an inline: definition, the simulator:
  1. Creates a sub-state-machine for the inline workflow
  2. Executes each inner node individually per iteration
  3. Evaluates conditions on inner nodes and skips those with false conditions
  4. Evaluates edges within the loop to determine node ordering
  5. Calls the mocker with qualified IDs like loop_id.inner_node_id
  6. Evaluates the while condition after each iteration
  7. If the sub-workflow declares outputs:, evaluates them for the while condition
For inline workflow nodes with type: workflow and inline:, the simulator:
  1. Creates a sub-state-machine for the inline workflow
  2. Evaluates conditions on each inner node and tracks false conditions as skipped
  3. Executes inner nodes using qualified IDs like workflow_id.inner_node_id
  4. Evaluates the sub-workflow’s outputs: expressions if declared
For referenced loops or workflows with ref:, the simulator uses black-box mocking with the ref name by default. When the scenario targets qualified inner nodes and the runner can resolve the referenced workflow, it executes that referenced workflow internally instead.

Expectations

The expect section defines assertions:

Partial Testing

Use start_at and state to test from a specific point in the workflow:

Loop Testing Patterns

Single Iteration (Exit Immediately)

Multi-Iteration Loop

Provide events for each iteration. The simulator consumes events per-node sequentially:

Testing Loop Output Routing

When a loop’s inline workflow declares outputs:, those evaluated outputs are available for downstream edge conditions:

Using Scenario Tools

In the workflow builder, use these tools to manage scenarios: Scenarios are stored alongside the workflow and run instantly without network calls or LLM API usage.