This project contains code for user interface (UI) automated tests made with Python, Pytest and Selenium for this website. Tests can run locally or inside a Docker container which is included and based on the official Selenium Chrome debugging Docker image. The debugging image was chosen because it allows visual inspection with a VNC client while tests are running.
You must have Google Chrome 86, Chrome Webdriver for Chrome 86, Python 3.8 and Pytest 6.1.2 installed on your system and administrator privileges to run the tests locally. To run them on the Docker container, you must have Docker installed.
- On the directory you pulled this project, run the tests with
pytest -v
. If Pytest is not on the path environment variable of your system, append the Python interpreter to the command and run Pytest as a module, withpython -m pytest -v
orpython3 -m pytest -v
, depending on how Python is configured on your system.
- Build image with
docker build -t selenium/standalone-chrome-debug:podium .
. - Run it with
docker run -d -p 4444:4444 -p 5900:5900 -v /dev/shm:/dev/shm --name podium selenium/standalone-chrome-debug:podium
. - Enter the container with
docker exec -it podium /bin/bash
. - Connect your VNC client on the 0.0.0.0:5900 address if you wish to visualize the tests while they run.
- Run the tests with
python3 -m pytest -v
.