https://github.com/qualityshepherd/python-e2e-test-example
Example e2e tests written in Python
https://github.com/qualityshepherd/python-e2e-test-example
e2e e2e-tests pytest python selenium test-python testing webdriver
Last synced: about 1 year ago
JSON representation
Example e2e tests written in Python
- Host: GitHub
- URL: https://github.com/qualityshepherd/python-e2e-test-example
- Owner: qualityshepherd
- Created: 2018-10-20T18:13:13.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2023-06-16T18:01:28.000Z (about 3 years ago)
- Last Synced: 2025-04-05T13:51:24.576Z (about 1 year ago)
- Topics: e2e, e2e-tests, pytest, python, selenium, test-python, testing, webdriver
- Language: Python
- Size: 27.3 KB
- Stars: 10
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Python E2E Test Example
Example Selenium/Webdriver e2e tests (some quite silly) that aim to illustrate solutions for common issues when writing e2e tests
### These Tests:
* run python selenium e2e tests against an existing website
* make use of a page object pattern
* use [pytest](http://pytest.org/) for most of the heavy lifting
* run on Firefox or Chrome
* run tests in parallel (via [pytest-parallel](https://pypi.org/project/pytest-parallel/) (requires python3.6+)
* run api tests using [requests](http://docs.python-requests.org/en/master/)
* run on merge on [CI](https://app.codeship.com/projects/312669)
## Requirements
So... while python is a lovely language, it has a silly need for keeping python2.7 around. So silly. Down that road lies madness, so we are _only_ talking about `python3`. I'm using [Homebrew (aka `brew`)](https://brew.sh/) to install things but you do you... install however you like.
1. [python3](https://www.python.org/downloads/) `brew install python3`
## Install
1. install requirements: `pip install -r requirements --user`
1. if you want to run on firefox, [download geckodriver](https://github.com/mozilla/geckodriver/releases) and move to a folder on your path (eg. `/usr/local/bin`)
## Run Tests
1. in Chrome (default): `pytest`
1. in Firefox `pytest --driver firefox`
1. in parallel `pytest --workers 2`