5 releases (3 breaking)

✓ Uses Rust 2018 edition

0.4.0 Feb 14, 2020
0.3.2 Dec 15, 2019
0.3.1 Nov 26, 2019
0.2.0 Jan 11, 2019
0.1.0 Dec 30, 2018

#123 in Testing

Download history 2942/week @ 2020-03-16 2805/week @ 2020-03-23 3518/week @ 2020-03-30 3398/week @ 2020-04-06 3735/week @ 2020-04-13 4851/week @ 2020-04-20 5687/week @ 2020-04-27 4729/week @ 2020-05-04 3788/week @ 2020-05-11 3334/week @ 2020-05-18 3012/week @ 2020-05-25 3996/week @ 2020-06-01 4111/week @ 2020-06-08 2654/week @ 2020-06-15 2755/week @ 2020-06-22 2577/week @ 2020-06-29

12,021 downloads per month
Used in 42 crates (19 directly)

MIT license

8KB
117 lines

serial_test

Version Downloads Docs MIT license Build Status MSRV: 1.36.0

serial_test allows for the creation of serialised Rust tests using the serial attribute e.g.

#[test]
#[serial]
fn test_serial_one() {
  // Do things
}

#[test]
#[serial]
fn test_serial_another() {
  // Do things
}

Multiple tests with the serial attribute are guaranteed to be executed in serial. Ordering of the tests is not guaranteed however.

Usage

We require at least Rust 1.36 for attribute-like procedural macros support (and parking_lot using smallvec 1.0)

Add to your Cargo.toml

[dev-dependencies]
serial_test = "*"

plus use serial_test::serial; (for Rust 2018) or

#[macro_use]
extern crate serial_test;

for earlier versions.

You can then either add #[serial] or #[serial(some_text)] to tests as required.

Dependencies

~390–720KB
~17K SLoC