Migration 5.1.x to 6.0.0
Use this plan when upgrading a Paramixel 5.1.x project directly to 6.0.0.
Migration focus
- Replace
SpecwithActionandBuilderconcepts. - Replace
Sequential.of()withsequential(),Parallel.of()withparallel(). - Replace
LifecyclewithScope(Staticis available but deprecated since 6.2 — preferScope). - Replace
AssertTrue/AssertFalsewithassertTrue(). - Replace
.each()on actions with theEachutility. - Refresh examples to use the 6.0.0 API.
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
Sequential,Parallel,Scope,Instance,Repeat,Timeout,Step, andAssert(Staticis deprecated since 6.2 — useScopeinstead). - Use
step(name, ContextConsumer)for user logic. - 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 static org.paramixel.api.action.Sequential.sequential;
import static org.paramixel.api.action.Step.step;
public final class SmokeTest {
@Paramixel.Factory
@Paramixel.Tag("smoke")
public static Action smoke() {
return sequential("smoke")
.child(step("arrange", ctx -> arrange()))
.child(step("act", ctx -> act()))
.child(step("assert", ctx -> assertResult()))
.build();
}
}