Skip to content
Dezmerean Robert edited this page Nov 8, 2019 · 2 revisions

This explains how to use the pre-made GraphWalker Docker images.

Pre-requisites

The Docker Image Library

GraphWalker has a couple of ready made Docker images in the Docker Image Library. Have a look at the GraphWalker Image Repo. The purpose of the images is for you to run an example with as low friction as possible. With Docker installed, they should be runnable out of the box.

The Amazon Shopping Cart Example

This example is explained more in detail here. But now we are going to run it using Docker:

docker pull graphwalker/amazon
docker run -ti --rm -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix \
    -v $HOME/.Xauthority:/home/developer/.Xauthority \
    --net=host --pid=host --ipc=host graphwalker/amazon

The output from the latest command should be:

Run following command:

mvn graphwalker:test

Type mvn graphwalker:test followed by Enter and watch the test start running.

The Amazon Shopping Cart example needs version 47.0.1 of Firefox to match the version 2.53.1 of Selenium in order to run successfully. The Docker image has that version of Firefox pre-installed, so you do not need to change anything on your computer to run the test.

The Amazon Shopping Cart Docker Image

If you are interested in how the image is built, fork and clone https://github.com/GraphWalker/docker-amazon. The Dockerfile is the build file for the docker image.

If you want to build your own local version, then run from the root folder of docker-amazon:

docker build -t my-amazon-shopping-cart-example .
Clone this wiki locally