Registry / testing / rstest

rstest

JSON →
library0.26.1rscratesunverified

Rust fixture based test framework using procedural macros for fixtures and table-based tests.

# Cargo.toml [dependencies] rstest = "0.26.1"
INSTALL
IMPORT
SIG · RSTEST
R
rstest
testingrustv0.26.1
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.

rstest
use rstest::rstest;

Write parameterized tests with rstest.

use rstest::rstest; #[rstest] #[case(2, 3, 5)] #[case(0, 0, 0)] fn test_add(#[case] a: i32, #[case] b: i32, #[case] expected: i32) { assert_eq!(a + b, expected); }
Debug
Known issues
gotchaRequires nightly Rust for some features like async fixtures.
fix
Use stable Rust for basic functionality; check documentation for nightly requirements.
affects: >=0.10.0
Upgrade
Version history
0.26.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
rstest — cargo add rstest · libregistry