This simple project includes automation tests of the online demo shop:
The structure of the project is based on Page Object Model and with using Selenium + Python.
Tests are checking ordering process (e2e testing), and testing login credentials.
All tests are running on travis CI:
- Create and activate virtual environment:
# virtual environment creation:
$ python3 -m venv .venv
# activation:
$ source .venv/bin/activate
# deactivation if needed:
$ deactivate
- Install required libraries on active .venv environment:
# basic command:
$ pip install -r requirements.txt
$ pip install -r test_requirements.txt
# or you can use:
$ make deps
$ make test
- Check your installation:
$ pip freeze
- Install geckodriver:
# Remember that the geckodriver needs to be in PATH.
# Check out if installed geckodriver is in /usr/bin or /usr/local/bin directory.
$ sudo apt install firefox-geckodriver
- Fork this repository and clone from your GitHub:
$ git clone https://github.com/<YOUR_GITHUB_USER_NAME>/selenium_python_demo_shop.git
- Use Makefile command to run all tests:
# to run all tests
$ make test
# to check syntax
$ make lint