Inspired by https://github.com/danielwhatmuff/robot-docker
This Dockerfile is designed to make it easier to run robot framework based UI-tests on CI environments.
It includes the ability to run tests sequentially with pybot or parallel with pabot
User needs to mount tests from host to docker image and set required environment variables.
Project includes two simple tests in tests directory, which also show how chromedriver can be configured to be used with SeleniumLibrary.
Run tests with pybot, passing only mandatory environment variables ROBOT_TESTS and ROBOT_LOGS
docker run --rm -e ROBOT_TESTS=/tests/ -e ROBOT_LOGS=/tests/logs/ -v $(pwd)/tests:/tests/ -ti yleisradio/docker-robotframework
Use tags to select only certain tests
docker run --rm -e ROBOT_TESTS=/tests/ -e ROBOT_LOGS=/tests/logs/ -e ROBOT_ITAG=google -v $(pwd)/tests:/tests/ -ti yleisradio/docker-robotframework
Run tests with pabot (2 processes without locks and 15 processes with locks):
docker run --rm -e ROBOT_MODE=pabot -e ROBOT_TESTS=/tests/ -e ROBOT_LOGS=/tests/logs/ -e LOG_LEVEL=DEBUG -v $(pwd)/tests:/tests/ -ti yleisradio/docker-robotframework
docker run --rm -e ROBOT_MODE=pabot -e PABOT_LIB=pabotlib -e PABOT_RES=/tests/conf/list_for_pabot.dat -e ROBOT_TESTS=/tests/tests -e ROBOT_LOGS=/tests/logs/ -e PABOT_PROC=15 --shm-size 6g -v $(pwd):/tests -ti yleisradio/docker-robotframework
Mandatory environment variables:
Optional environment variables:
Note that PABOT_LIB and PABOT_RES must be right after the ROBOT_MODE (otherwise the value set file is not found)
If you do changes to the image, you can test local version by building your own image:
cd robotframework
docker build -t docker-robotframework .
Bug reports and pull requests are welcome on GitHub at https://github.com/Yleisradio/docker-robotframework. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The Dockerfile is available as open source under the terms of the MIT License.