rustapi-testing
Lens: "The Auditor"
Philosophy: "Trust, but verify."
A fluid, ergonomic test harness for RustAPI applications. Don't just test your logic; test your endpoints.
The TestClient
Integration testing is often painful. We make it easy. TestClient spawns your RustApi application without binding to a real TCP port, communicating directly with the service layer.
let client = new;
Fluent Assertions
The client provides a fluent API for making requests and asserting responses.
client.post
.json
.send
.await
.assert_status
.assert_header;
Mocking Services
Because rustapi-rs relies heavily on Dependency Injection via State<T>, you can easily inject mock implementations of your database or downstream services when creating the RustApi instance for your test.
Full Example