19 unstable releases (9 breaking)

Uses new Rust 2024

0.10.0 May 21, 2026
0.8.0 May 2, 2026
0.7.0 May 30, 2024
0.6.0 Mar 22, 2024
0.3.0 Jul 14, 2021

#1839 in HTTP server

Download history 953/week @ 2026-02-19 1439/week @ 2026-02-26 1924/week @ 2026-03-05 1084/week @ 2026-03-12 724/week @ 2026-03-19 652/week @ 2026-03-26 807/week @ 2026-04-02 818/week @ 2026-04-09 441/week @ 2026-04-16 485/week @ 2026-04-23 198/week @ 2026-04-30 308/week @ 2026-05-07 333/week @ 2026-05-14 239/week @ 2026-05-21 151/week @ 2026-05-28 360/week @ 2026-06-04

1,254 downloads per month
Used in 13 crates

MIT/Apache

2MB
41K SLoC

🧪 trillium-testing — test utilities for Trillium apps

ci crates.io version docs.rs

Testing utilities for Trillium applications. Provides assertion macros (assert_ok!, assert_status!, assert_response!, assert_not_handled!), a TestConn builder for constructing requests, and a synchronous test runner — no real TCP listener needed. Enable one of the tokio, smol, or async-std cargo features to select the async runtime.

Example

use trillium::Conn;
use trillium_testing::prelude::*;

async fn handler(conn: Conn) -> Conn {
    conn.ok("hello testing")
}

assert_ok!(get("/").on(&handler), "hello testing");
assert_not_handled!(get("/").on(&()));

Safety

This crate uses #![forbid(unsafe_code)].

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~10–19MB
~395K SLoC