Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

Running Boost ITs

Scott Kurz edited this page Sep 19, 2019 · 1 revision

Running integration tests

From top level build

They can take minutes to run, so are disabled by default.

Basic execution:

mvn install

To run with all integration tests:

mvn install -Pit

To run with integration tests on a preset runtime:

Use -DboostRuntime=ol for io.openliberty:openliberty runtime or -DboostRuntime=wlp for com.ibm.websphere.appserver.runtime:wlp-javaee7 or -DboostRuntime=tomee for Apache TomEE.

mvn install -Pit -DboostRuntime=ol

To run only some integration tests (e.g. one module):

mvn install -Pit -Dinvoker.test=test-jaxrs* -DboostRuntime=ol

To run against a remote Docker engine:

export DOCKER_HOST=tcp://myhost.com:2375; mvn install -Pit ...

From build project (cd target/it/test-xxxx)

Run tests

mvn install -DboostRuntime=ol -Dboost_http_port=9000

THE REST IS OUTDATED

NOTE:

You may need to substitute in pom.xml for <version>@pom.version@</version> eg : <version>0.1.2</version>

Run tests

mvn install -DruntimeVersion=18.0.0.3 -DruntimeGroupId=io.openliberty -DruntimeArtifactId=openliberty-runtime -Ddockerizer=liberty

Debug the IT itself

mvn install -Dmaven.failsafe.debug -DruntimeVersion=18.0.0.3 -DruntimeGroupId=io.openliberty -DruntimeArtifactId=openliberty-runtime -Ddockerizer=liberty

Debug one IT (here DockerBuildIT.java)

mvn install -Dmaven.failsafe.debug -DruntimeVersion=18.0.0.3 -DruntimeGroupId=io.openliberty -DruntimeArtifactId=openliberty-runtime -Ddockerizer=liberty -Dit.test=DockerBuildIT

Debug the Maven build, not just the IT execution (of the child IT project)

mvnDebug install -DruntimeVersion=18.0.0.3 -DruntimeGroupId=io.openliberty -DruntimeArtifactId=openliberty-runtime -Ddockerizer=liberty

Eclipse

When importing the code into Eclipse, do it in two steps:

  1. Import the top-level project

Import -> Maven (Existing Maven Projects)

"Root Directory" => repo home (project.basedir)

  1. Import the parent of the individual integration test projects

Import -> Maven (Existing Maven Projects)

"Root Directory" => IT parent module home (project.basedir/src/it)

Troubleshooting

ITs (and Boost package) runs slow on Windows 10

Windows Defender can greatly slow down the unzip of a Liberty runtime performed in the package goal, currently from about 10s -> 80s.

Solution: Follow steps like these to take a subdirectory and remove it from scanning.