Module testing

Module testing 

Source

Re-exports§

pub use multipart::MultipartFilePart;
pub use multipart::build_multipart_body;
pub use test_client::TestClient;
pub use form::encode_urlencoded_body;

Modules§

form
multipart
test_client
Core test client for Spikard applications

Structs§

ResponseSnapshot
Snapshot of an Axum response used by higher-level language bindings.
SseEvent
A single Server-Sent Event.
SseStream
Server-Sent Events (SSE) stream for testing.
WebSocketConnection
WebSocket connection wrapper for testing.

Enums§

SnapshotError
Possible errors while converting an Axum response into a snapshot.
WebSocketMessage
A WebSocket message that can be text or binary.

Functions§

call_test_server
Execute an HTTP request against an Axum TestServer by rehydrating it into the server’s own axum_test::TestRequest builder.
connect_websocket
Connect to a WebSocket endpoint on the test server.
snapshot_http_response
Convert an Axum response into a reusable ResponseSnapshot.
snapshot_response
Convert an AxumTestResponse into a reusable ResponseSnapshot.