Running ITs locally - OpenLiberty/ci.maven GitHub Wiki
Cheat Sheet techniques
This isn't intended to be a complete guide.
Note on maven-invoker-plugin
The invoker plugin allows for an IT to do another invocation in a structured way, calling goals/phases/invocations of the test invocation from the top-level failsafe/surefire test/IT. It has some pattern-matching abilities to save time.
The tests involving server stop/start are especially time-consuming.
setup and run subset of ITs
-
Setup from liberty-maven-plugin dir
cd liberty-maven-plugin; mvn verify -Ponline-its -Dinvoker.test="setup" -Druntime=ol -DruntimeVersion=21.0.0.6
# could use other runtimes -
Run subset via invoker:
mvn verify -Ponline-its -Dinvoker.test="ear-project-it*" -Druntime=ol -DruntimeVersion=21.0.0.6
For rapid debug, it can be a shortcut to work out of target dir, if you know what you're doing (be careful)
-
Switch to target dir:
cd liberty-maven-plugin/target/it/ear-project-it
-
Run mvn verify "directly" (not via invoker)
mvn verify -DruntimeGroupId=io.openliberty -DruntimeArtifactId=openliberty-runtime -DruntimeVersion=21.0.0.6
# not all tests are configured to install features