This documentation only applies to Magnolia 5.4.x and below.
If you aim to write UI tests for Magnolia 6.1 and higher, please check the documentation on bitbucket.
- Use a standard docker container to execute selenium tests
- Easier to setup and recreate ... even easy to recreate the container for every test run which provides better repeatable test results
- Overhead to have many containers for each browser in minimal.
Execute UI Test using the standard selenium docker container
Run selenium server for firefox
Execute all UI tests
containerHostName with an IP or name which is accessible from the container (by default the container uses the same DNS as the host system)
To debug the container provides the option to connect via a VNC. macOS has already a good VNC Client (Screen Sharing) you can use monitor the test execution.
Open Safari and enter
The password is "secret"
The standard selenium docker containers provide an easy to setup selenium grid. The selenium grid consists of multiple nodes with same or different browser setups which are all hidden behind a hub. This means for test executions nothing changes but the selenium server is able to provide multiple sessions with different capabilities.
Start up the HUB
Start up and register the nodes
If you want to debug, you have to use the -debug image for the nodes and map the VNC ports.
Execute UI tests in parallel
By default the selenium test are executed in sequence. We have to explicitly configure maven/surefire to execute our tests in parallel.
As the tests still operate on the same magnolia instance it might be a good idea to not execute test methods of the same class in parallel.