facet-testhelpers

A collection of testing helpers and utilities for facet

54 releases (20 breaking)

Uses new Rust 2024

new 0.50.0-rc.0 Jun 9, 2026
0.46.0 Apr 15, 2026
0.44.3 Mar 16, 2026
0.41.0 Dec 31, 2025
0.28.0 Jul 24, 2025

#410 in Testing

Download history 9/week @ 2026-02-20 81/week @ 2026-02-27 137/week @ 2026-03-06 278/week @ 2026-03-13 225/week @ 2026-03-20 290/week @ 2026-03-27 169/week @ 2026-04-03 382/week @ 2026-04-10 296/week @ 2026-04-17 142/week @ 2026-04-24 125/week @ 2026-05-01 376/week @ 2026-05-08 317/week @ 2026-05-15 550/week @ 2026-05-22 159/week @ 2026-05-29 506/week @ 2026-06-05

1,568 downloads per month
Used in 41 crates (26 directly)

MIT/Apache

15KB
121 lines

facet-testhelpers

Coverage Status crates.io documentation MIT/Apache-2.0 licensed Discord

Lightweight test helpers: a log facade that always does tracing (with colors), and color-backtrace using the btparse backend.

Usage

Add this to your test files:

#[facet_testhelpers::test]
fn my_test() {
    log::info!("This will be printed with color!");
    // Your test code here
}

The test macro sets up a simple logger that works with both cargo test and cargo nextest run.

Recommendation

While this crate works with regular cargo test, we recommend using cargo-nextest for:

  • Process-per-test isolation
  • Faster parallel test execution
  • Better test output and reporting

Install with:

cargo install cargo-nextest

Then run tests with:

cargo nextest run

Sponsors

Thanks to all individual sponsors:

GitHub Sponsors Patreon

…along with corporate sponsors:

AWS Zed Depot

…without whom this work could not exist.

Special thanks

The facet logo was drawn by Misiasart.

License

Licensed under either of:

at your option.

Dependencies

~5.5–9.5MB
~96K SLoC