test_deps

Crates.iotest_deps
lib.rstest_deps
version0.1.0
sourcesrc
created_at2021-05-20 07:12:52.620496
updated_at2021-05-20 07:12:52.620496
descriptionAllows developers to define dependencies among tests
homepage
repositoryhttps://github.com/nshou/test_deps
max_upload_size
id399879
size51,028
(nshou)

documentation

README

test_deps

test_deps allows developers to define dependencies among tests.

Status

Quick Examples

// 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() {}

Usage

Add

[dev-dependencies]
test_deps = "0.1"

to your Cargo.toml and add

use test_deps::deps;

to your test module.

Detailed Spec

See docs.rs.

License

MIT. See COPYING.

Donation

Buy me a coffee

Commit count: 61

cargo fmt