Attribute Macro testutils::serial[]

#[serial]

Allows for the creation of serialised Rust tests

#[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. If you want different subsets of tests to be serialised with each other, but not depend on other subsets, you can add an argument to serial, and all calls with identical arguments will be called in serial. e.g.

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

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

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

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

test_serial_one and test_serial_another will be executed in serial, as will test_serial_third and test_serial_fourth but neither sequence will be blocked by the other