$ serial_test
v3.4.0Allows for the creation of serialised Rust tests
Latest Update Summary
Crate
Name: serial_test New version: 3.3.1 Release date: 2026-01-04T22:55:17.807127Z
Crate readme
Short description serial_test allows for the creation of serialised Rust tests using the serial attribute
Long description
The serial_test crate enables the creation of serialised tests in Rust. It ensures that multiple tests marked with the serial attribute are executed in serial, though the order of execution is not guaranteed. Tests marked with the parallel attribute may run concurrently, but will not execute at the same time as serial tests. Support for file_serial is provided for cases where tests are run as separate processes, employing file locking for synchronization. The crate supports a minimum Rust version of 1.68.2, with lower versions potentially working but not officially supported.
Features • Minimum supported Rust version: 1.68.2 • Supports async tests with Tokio • Allows multiple tests to be executed serially with the serial attribute • File locking support with the file_serial attribute • Mod-level application of attributes to all test functions
Code Examples Add to Cargo.toml
[dev-dependencies]
serial_test = "*"
Basic usage
use serial_test::serial;
#[test]
#[serial]
fn test_serial_one() {
// Do things
}
#[test]
#[serial]
fn test_serial_another() {
// Do things
}
#[tokio::test]
#[serial]
async fn test_serial_another() {
// Do things asynchronously
}
Links • https://crates.io/crates/serial_test • https://docs.rs/serial_test/
https://api.github.com/repos/palfrey/serial_test/releases/274092644
Release info
Release version:
Release description
Code Examples
Minor update: 3.3.1 → 3.4.0
$ DOWNLOADS TREND
$ VERSION HISTORY
$ LINKS
$ INSTALL
cargo add serial_testOr add to Cargo.toml: serial_test = "3.4.0"