Action Composition
Paramixel test plans are ordinary Action trees.
Common composition patterns
Ordered run-all
Action suite = Sequential.of(
"suite",
Direct.of("step 1", context -> {}),
Direct.of("step 2", context -> {}));
Ordered fail-fast
Action suite = StrictSequential.of(
"suite",
Direct.of("step 1", context -> {}),
Direct.of("step 2", context -> {}));
Concurrent children
Action suite = Parallel.of(
"suite",
Direct.of("a", context -> {}),
Direct.of("b", context -> {}));
Setup / body / teardown
Action suite = Lifecycle.of(
"suite",
Direct.of("before", context -> {}),
Direct.of("main", context -> {}),
Direct.of("after", context -> {}));
Nesting
Actions can be nested arbitrarily.
Action suite = Sequential.of(
"suite",
Lifecycle.of(
"case 1",
Direct.of("before", context -> {}),
Parallel.of(
"checks",
Direct.of("a", context -> {}),
Direct.of("b", context -> {})),
Direct.of("after", context -> {})),
Noop.of("finished"));
Choosing between sequential variants
Sequential- always run every childStrictSequential- stop on first failureRandomSequential- shuffle, but still run every childStrictRandomSequential- shuffle and stop on first failure