6 releases

Uses new Rust 2021

0.2.4 Sep 11, 2022
0.1.4 Sep 3, 2022
0.1.3 Jun 15, 2022

#183 in Testing

Download history 62/week @ 2022-06-07 31/week @ 2022-06-14 8/week @ 2022-06-21 8/week @ 2022-06-28 4/week @ 2022-07-12 8/week @ 2022-07-19 12/week @ 2022-07-26 9/week @ 2022-08-02 1/week @ 2022-08-09 1/week @ 2022-08-16 4/week @ 2022-08-23 18/week @ 2022-08-30 25/week @ 2022-09-06 12/week @ 2022-09-13 1/week @ 2022-09-20

56 downloads per month

Apache-2.0

6KB

sequential-test

Version Downloads Docs APACHE 2.0 license

Allows for the creation of sequential tests.

#[cfg(test)]
mod tests {
    #[test]
    #[sequential]
    fn test1() {
        // ...
    }
    #[test]
    #[sequential]
    fn test2() {
        // ...
    }
    #[test]
    #[parallel]
    fn test3() {
        // ...
    }
}
  • Tests with the sequential attribute are guaranteed to be executed sequentially.
  • Tests with the parallel attribute may run in parallel of each other but will not run at the same time as tests with the sequential attribute.
  • Tests with neither attributes may run in parallel with any tests.

Defining sequential or parallel attributes on non-tests or within scopes is considered UB.

This library is both faster[^speed] and smaller than serial_test however offers less functionality.

[^speed]: The current benchmark illustrate sequential-test covers the test set in an average of ~350ms while serial_test covers the test set in an average of ~550ms.

Dependencies