Skip to main content
Version: 2.0.0

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 = DependentSequential.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 child
  • DependentSequential - stop on first failure
  • RandomSequential - shuffle, but still run every child
  • DependentRandomSequential - shuffle and stop on first failure