Scenario
Scenario defines a complete test case for a workflow. A scenario provides simulated events that mock external interactions (LLM calls, tool executions) and expectations that verify the workflow behaves correctly. Example - Basic LLM response test:Fields
SimulatedEvent
SimulatedEvent represents a single mocked event in a test scenario. Events target specific nodes and provide mock outputs. There are two modes:- Raw output mode: Set Output directly with the activity’s output structure
- Typed mode: Set Type with typed fields (text, tool_calls, tool_output)
- node: call_llm
- node: agent_loop.call_llm
- name: bash
- node: agent_loop.execute_tools
- node: custom_node
Fields
SimToolCall
SimToolCall represents a tool call in a simulated LLM response. Example:Fields
Expectation
Expectation defines what to verify after a scenario runs. All fields are optional - specify only what you want to assert. Node references support qualified IDs for inner loop and workflow nodes. Example - Assert completion and reached nodes:Fields
Targeting Nodes
Thenode field on events targets specific nodes by ID:
- Top-level nodes:
node: "call_llm" - Inner loop nodes:
node: "loop_id.inner_node_id"(dot-separated) - Inner workflow nodes:
node: "workflow_id.inner_node_id"(fortype: workflowwithinline:) - Nested structures:
node: "outer.inner.node_id"
- Events with a
nodefield are matched to that specific node - Events without a
nodefield are consumed sequentially in order - Multiple events with the same node are consumed in order per-node (use for multi-iteration loops)