You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

  • 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

Prerequisites

  • Docker

Run selenium server for firefox

$ docker run -d -p 4444:4444 -e SCREEN_WIDTH=1280 -e SCREEN_HEIGHT=1024 -e SCREEN_DEPTH=24 selenium/standalone-firefox:2.53.1-beryllium

Execute all UI tests

$ cd magnolia-bundle
$ mvn clean install -Pui-tests,jetty9-standalone -DseleniumServerHostName=localhost -DcontainerHostName=192.168.10.40


Replace the containerHostName with an IP or name which is accessible from the container (by default the container uses the same DNS as the host system)

Debug

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.

$ docker run -d -p 4444:4444 -p 5901:5900 -e no_proxy=localhost -e SCREEN_WIDTH=1280 -e SCREEN_HEIGHT=1024 -e SCREEN_DEPTH=24 selenium/standalone-firefox-debug:2.53.1-beryllium

Open Safari and enter

vnc://localhost:5901

The password is "secret"

The Grid



  • No labels