pub struct McpIntegrationTest { /* private fields */ }Expand description
Integration test utilities for full MCP workflows
Implementations§
Source§impl McpIntegrationTest
impl McpIntegrationTest
pub fn new() -> Self
pub fn with_middleware_config(middleware_config: MiddlewareConfig) -> Self
pub fn harness(&self) -> &McpTestHarness
Sourcepub async fn test_tool_workflow(
&self,
tool_name: &str,
arguments: Option<Value>,
) -> CallToolResult
pub async fn test_tool_workflow( &self, tool_name: &str, arguments: Option<Value>, ) -> CallToolResult
Test a complete workflow: list tools -> call tool -> verify result
§Panics
Panics if the tool is not found or the workflow fails
Sourcepub async fn test_resource_workflow(&self, uri: &str) -> ReadResourceResult
pub async fn test_resource_workflow(&self, uri: &str) -> ReadResourceResult
Test a complete resource workflow: list resources -> read resource -> verify result
§Panics
Panics if the resource is not found or the workflow fails
Sourcepub async fn test_prompt_workflow(
&self,
name: &str,
arguments: Option<Value>,
) -> GetPromptResult
pub async fn test_prompt_workflow( &self, name: &str, arguments: Option<Value>, ) -> GetPromptResult
Test a complete prompt workflow: list prompts -> get prompt -> verify result
§Panics
Panics if the prompt is not found or the workflow fails
Sourcepub async fn test_error_handling_workflow(&self)
pub async fn test_error_handling_workflow(&self)
Sourcepub async fn test_performance_workflow(&self)
pub async fn test_performance_workflow(&self)
Test performance workflow
Trait Implementations§
Auto Trait Implementations§
impl Freeze for McpIntegrationTest
impl !RefUnwindSafe for McpIntegrationTest
impl Send for McpIntegrationTest
impl Sync for McpIntegrationTest
impl Unpin for McpIntegrationTest
impl !UnwindSafe for McpIntegrationTest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more