Before all
- Install scoop from www.scoop.sh
- Install allure commandline by running the following command: scoop install allure
from scratch:
- git clone
- cd to project directory
- Installing virtualenv: py -m pip install --user virtualenv
- Creating a virtual environment: py -m venv env
- Activating a virtual environment: .\env\Scripts\activate
- pip install pipenv
- pipenv install
- run tests: pipenv run pytest -n 3 --alluredir=allure-results --browser <firefox/remote/chrome_headless> if no browser was selected then chrome will be used. if no threads are given test will run on single thread (-n 3 is 3 threads).
- view allure results: allure serve allure-results
Run according to tags:
- pipenv run pytest -k "<tag_name>" --browser <firefox/chrome/remote/chrome_headless>
GitHub Pages allure results:
https://github.com/nirtal85/Selenium-Python-Example/deployments/activity_log?environment=github-pages
for help and custom CLI options:
pytest --help