6 releases

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

#753 in Testing

Download history 2261/week @ 2025-08-18 2306/week @ 2025-08-25 1350/week @ 2025-09-01 1375/week @ 2025-09-08 1364/week @ 2025-09-15 1245/week @ 2025-09-22 1096/week @ 2025-09-29 1321/week @ 2025-10-06 1365/week @ 2025-10-13 1171/week @ 2025-10-20 1126/week @ 2025-10-27 1027/week @ 2025-11-03 1050/week @ 2025-11-10 906/week @ 2025-11-17 831/week @ 2025-11-24 1020/week @ 2025-12-01

3,819 downloads per month
Used in 3 crates

Apache-2.0

7KB
57 lines

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