-
Improvement
-
Resolution: Done
-
Neutral
-
None
-
None
-
None
If we start using the complex scenarios with parallel test execution, Fabic8 Maven plugin won't be powerful enough to do the trick:
- Selenium Grid usage implies varying amount of the Selenium nodes
- Forked JVM execution might also require more than one Mgnl app server container to be started. Configuring that with XML in pom file is not feasible and bulky.
- Managing the Docker networking from within pom.xml is bulky and adds lot's of noise.
The alternative solution is to do all the test environment manipulations from the code. We can implement the JUnit rules make sure that the test have all they need and manage containers and networks via Docker API for Java and TestContainers library. Note: this should be implemented primarily so that the developer would be able to run the integration and UI test builds locally without having to provide test environment by hand.
In case of CD/CI the test environment should be provided externally (the whole cluster of mgnl and selenium containers running on different machines). Such environment should be managed by e.g. Jenkins pipeline and it shouldn't be an mvn's or test implementation's concerns. That should be an easily available option.
As a side effect of phasing out the test env config from pom.xml we lose the need to duplicate such configuration in e.g. EE integration test pom.xml (the Java code is essentially shared, external deployment is managed externally). What we do for CE automatically propagates onto EE (we should make sure that flexibility is not lost and EE can e.g. configure own ports, Docker images etc).