Skip to main content

Module testing

Module testing 

Source

Structs§

AgentEventBuilder
AgentTrace
A recorded agent event stream (as seen by an AgentObserver), with assertion helpers for trace-shaped tests. Build one with TestAgentBuilder::run_trace.
CapturedElicitation
CapturedTaskUpdate
CapturedToolCall
FakeAgentObserver
In-memory AgentObserver that records every event it receives, for asserting on the stream an agent emits.
FakeMcpServer
A fake MCP server preloaded with the classic math tools (add_numbers, divide_numbers, slow_tool); add scripted tools with Self::with_tool.
FakeMcpState
FakeTool
FakeToolResponse
McpTest
McpTestBuilder
TaskOutcome
TestAgentBuilder
TestAgentResult
Result of running a test agent, including messages and captured contexts.
TestScenario
A fluent sequence of commands and synchronization points for a test agent.
ToolCallOutcome

Enums§

TestAgentError
Error returned by TestAgentBuilder::run, TestAgentBuilder::run_trace, and TestAgentBuilder::run_with_context.
TestAgentStep
An ordered interaction with a test agent.

Traits§

McpBuilderTestExt

Functions§

agent_event
content_events
drain_until
fake_mcp
map_event_names
Maps trace-relevant events to compact names for order assertions, skipping content messages.
mcp_instructions
test_agent

Type Aliases§

TestResult