Presentation of my talk on using Geb to test against a Selenium Grid
Selenium Grid Setup
- Ensure docker and docker-compose gets installed for your OS.
- If using Windows,
- I recommend installing Docker Toolbox instead of Docker for Windows. Both Docker and Docker Compose will be installed with Docker Toolbox.
- However, these instructions should work using Docker for Windows (not tested).
- If using Linux, both Docker and Docker Compose will need to be installed.
- Ensure at least 4GB of memory is available.
- If using Docker Toolbox, open VirtualBox to configure at least 4GB of memory to the default VM.
- If using Linux, ensure your system has sufficient RAM installed.
- Build the base image
docker build -t selenium_grid/base:2.53.1 base/.
- Build and start the hub and one firefox node
docker-compose up -d hub firefox
- Scale to specified number of firefox nodes
docker-compose scale firefox=6
- View your running containers
Access to Selenium Grid Hub Console
- Determine the IP address of your docker
- If using Docker Toolbox
- If using Linux
ip address show
- Using a browser
- navigate to
Selenium Grid Shutdown
- Stop and remove the selenium grid containers.
- Verify your containers are removed
docker ps -a
Debug a container
- Start a bash shell in a running container
docker -it <container_id> bash
- You can run any command that is installed in this container.
- To exit the container's bash shell