Paramixel
Paramixel is a Java 17+ test framework built around executable Action trees.
Instead of describing tests with many framework-specific annotations, you build them with plain Java using actions like Sequential, Parallel, Lifecycle, and Direct.
Core ideas
- Tests are trees of
Actionobjects. - Discovery is optional:
@Paramixel.ActionFactorymarks apublic staticno-arg factory method. Runner.run(action)executes an action tree and returns aResult.- Read outcomes from the returned
Resulttree or fromaction.getResult()after execution. - Runtime state is passed through
Contextand itsStore.
Minimal example
import org.paramixel.core.Action;
import org.paramixel.core.Paramixel;
import org.paramixel.core.action.Direct;
import org.paramixel.core.action.Sequential;
public class MyTest {
@Paramixel.ActionFactory
public static Action actionFactory() {
return Sequential.of(
"MyTest",
Direct.of("step 1", context -> {}),
Direct.of("step 2", context -> {}));
}
}
Running tests
Programmatically
import org.paramixel.core.Runner;
import org.paramixel.core.Factory;
Action action = MyTest.actionFactory();
Result result = Factory.defaultRunner().run(action);
if (result.getStatus().isFailure()) {
throw new IllegalStateException("test failed");
}
From the console
import org.paramixel.core.Runner;
Runner runner = Runner.builder().build();
int exitCode = runner.runAndReturnExitCode(action);
System.exit(exitCode);
With Maven
Use the Paramixel Maven plugin. It discovers @Paramixel.ActionFactory methods on the test classpath and runs them during the test phase.
Built-in actions
Direct- run a callbackSequential- run all children in orderDependentSequential- stop on first child failure; skip the restRandomSequential- run all children in shuffled orderDependentRandomSequential- shuffled fail-fast executionParallel- run children concurrentlyLifecycle-before,main,afterNoop- do nothing and pass
Configuration
Core configuration is loaded from:
paramixel.propertieson the classpath- JVM system properties
- programmatic
Runner.builder().configuration(...)overrides, when used
Built-in keys include paramixel.parallelism, paramixel.match.package, paramixel.match.class, and paramixel.match.tag.
Use @Paramixel.Tag to tag action factories for selective discovery:
@Paramixel.ActionFactory
@Paramixel.Tag("smoke")
public static Action smokeTests() { /* ... */ }