Docker image for running UI tests in Chrome
This docker image uses gauge and takio to run UI tests in Chrome. This can be used to run the tests locally without installing the dependencies and in CI builds.
Bind your whole gauge directory and call the gauge command or your relevant yarn script, for example, in your gauge directory:
docker run --rm -v ${PWD}:/gauge committed/ui-test gauge run specs/
or
docker run --rm -v ${PWD}:/gauge committed/ui-test yarn test
The results will be returned in the console and a report written to ${PWD}/reports/html-report. Logs will be written to ${PWD}/logs.
Installs requirements for UI testing:
The docker image contains a standard Gauge project layout from gauge init js so you can just bind your specs and tests and reports directories and get the standard settings.
If you want to run against something running on localhost you will need to use docker.host.internal instead and if running on linux then the docker run will need the additional parameter -add-host=host.docker.internal:host-gateway.
To build the docker image run:
./build.shTo test the docker image run the docker image with appropriate command e.g.:
docker run --rm committed/ui-test test.sh
A test file ./test.sh uses the version commands of each tool to check it is installed.
This is based on the original Dockerfile from Gauge js template.
The Dockerfiles and associated scripts are licensed under the MIT license.