#serial #test #testing

dev serial_test

Allows for the creation of serialised Rust tests

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

#30 in Testing

Download history 2777/week @ 2020-02-06 2306/week @ 2020-02-13 2325/week @ 2020-02-20 2611/week @ 2020-02-27 2312/week @ 2020-03-05 2907/week @ 2020-03-12 2725/week @ 2020-03-19 3349/week @ 2020-03-26 3345/week @ 2020-04-02 3434/week @ 2020-04-09 4318/week @ 2020-04-16 5434/week @ 2020-04-23 5445/week @ 2020-04-30 4124/week @ 2020-05-07 3480/week @ 2020-05-14 2908/week @ 2020-05-21

11,806 downloads per month
Used in less than 37 crates

MIT license

6KB

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

~0.8–1.3MB
~27K SLoC