Registry / testing / axum-test

axum-test

JSON →
library20.0.0rscratesunverified

Easy E2E testing for Axum web applications.

# Cargo.toml [dependencies] axum-test = "20.0.0"
INSTALL
IMPORT
SIG · AXUM-TEST
A
axum-test
testingrustv20.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TestServer
use axum_test::TestServer;

Creates a test server from an Axum router and sends a GET request.

use axum_test::TestServer; use axum::Router; let app = Router::new(); let server = TestServer::new(app).unwrap(); let response = server.get("/").await; assert_eq!(response.status_code(), 200);
Debug
Known issues
gotchaRequires tokio runtime for async tests
fix
Add #[tokio::test] attribute to test functions
affects: >=0.1.0
Upgrade
Version history
20.0.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
20 hits · last 30 days
node
18
OpenAI (training)
1
Resources
axum-test — cargo add axum-test · libregistry