Migration 4.x to 6.0.0
Use this plan when upgrading a Paramixel 4.x project directly to 6.0.0.
Migration focus
- Replace
org.paramixel.coreimports withorg.paramixel.apiimports. - Replace
@Paramixel.ActionFactorywith@Paramixel.Factory. - Replace
ContainerandDirectpatterns withSequence,Scope,Parallel, andStep. - Replace
Store-style shared state with fixture instances exposed throughInstanceandContext.
6.0.0 target checkpoints
- Use Java 17+ and imports from
org.paramixel.api,org.paramixel.api.action,org.paramixel.api.selector, andorg.paramixel.api.support. - Define discovery entry points as public static methods annotated with
@Paramixel.Factory. - Return
Action,Builder, ornullfrom factories;nullproduces a skipped outcome. - Build action trees with
Sequence,Parallel,Scope,Static,Instance,Repeat,Timeout,Step, andAssert. - Read execution state from
Result.descriptor()and the descriptor tree. - Configure runs with
paramixel.properties, JVM system properties, or programmaticConfigurationobjects. - Use
paramixel.match.package.regex,paramixel.match.class.regex, andparamixel.match.tag.regexfor discovery filtering. - Use
paramixel.report.fileto enable.json,.xml,.html,.log, or.txtreports.
Recommended path
- Update dependencies to the 6.0.0 core and Maven plugin artifacts.
- Replace legacy imports, annotations, and action builders with the 6.0.0 API.
- Move configuration to
paramixel.properties, JVM-Dproperties, or programmaticConfigurationobjects. - Run the Paramixel examples or your factory package with
mvn paramixel:test,mvn test, or a GradleJavaExectask that invokesorg.paramixel.api.Runner. - Enable
paramixel.report.fileduring validation so the descriptor tree and aggregate outcome are visible.
Minimal 6.0.0 factory
import org.paramixel.api.Paramixel;
import org.paramixel.api.action.Action;
import org.paramixel.api.action.Sequence;
import org.paramixel.api.action.Step;
public final class SmokeTest {
@Paramixel.Factory
@Paramixel.Tag("smoke")
public static Action smoke() {
return Sequence.builder("smoke")
.child(Step.of("arrange", ctx -> arrange()))
.child(Step.of("act", ctx -> act()))
.child(Step.of("assert", ctx -> assertResult()))
.build();
}
}