test_deps
allows developers to define dependencies among tests.
// Serial
// A -> B -> C
#[deps(A)]
#[test]
fn test_a() {}
#[deps(B: A)]
#[test]
fn test_b() {}
#[deps(C: B)]
#[test]
fn test_c() {}
// Fork
// A -+-> B
// `-> C
#[deps(A)]
#[test]
fn test_a() {}
#[deps(B: A)]
#[test]
fn test_b() {}
#[deps(C: A)]
#[test]
fn test_c() {}
// Merge
// A --\
// B --+-> C
#[deps(A)]
#[test]
fn test_a() {}
#[deps(B)]
#[test]
fn test_b() {}
#[deps(C: A B)]
#[test]
fn test_c() {}
Add
[dev-dependencies]
test_deps = "0.1"
to your Cargo.toml and add
use test_deps::deps;
to your test module.
See docs.rs.
MIT. See COPYING.