Recommended crates
There are a lot of testing crates in Rust that provide functionality that test ur code XD does not. Here are some recommendations:
Utilities
Crate |
Description |
Nextest |
A new, faster test runner for Rust |
Static assertions |
Compile-time assertions for Rust |
Fail |
Fail point implementation for Rust |
partial-io |
Helpers for testing I/O behavior with partial, interrupted and blocking reads and writes |
assert_cmd |
Easy command initialization and assertions |
Test cases
Crate |
Description |
serial_test |
Allows for the creation of serialised Rust tests |
rstest |
Fixture-based test framework for Rust |
Datatest |
Crate for supporting data-driven tests |
Fuzzing and property testing
Crate |
Description |
Arbitrary |
Trait for generating structured data from arbitrary, unstructured input |
Proptest |
Property testing framework inspired by the Hypothesis framework for Python |
Kani |
Bit-precise model checker for Rust |
Bolero |
Fuzz and property testing front-end for Rust |
Mocking
Crate |
Description |
Mockall |
Powerful mock object library for Rust |