Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andgineer/e2e-tests
End to end py.test with Selenium Grid in docker-compose
https://github.com/andgineer/e2e-tests
docker docker-compose pytest python selenium selenium-grid tests
Last synced: 19 days ago
JSON representation
End to end py.test with Selenium Grid in docker-compose
- Host: GitHub
- URL: https://github.com/andgineer/e2e-tests
- Owner: andgineer
- Created: 2019-03-19T02:39:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-06T06:44:53.000Z (6 months ago)
- Last Synced: 2024-10-12T16:13:32.140Z (about 1 month ago)
- Topics: docker, docker-compose, pytest, python, selenium, selenium-grid, tests
- Language: Python
- Homepage: https://sorokin.engineer/posts/en/e2e_tests.html
- Size: 3.17 MB
- Stars: 11
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Github CI Status](https://github.com/andgineer/e2e-tests/workflows/ci/badge.svg)](https://github.com/andgineer/e2e-tests/actions)
## End-to-end web UI testsUses headless-browsers and Selenuim Grid in docker-compose.
Produce beautiful reports with [allure](https://github.com/allure-framework/allure2).
Read more in my [blog](https://sorokin.engineer/posts/en/e2e_tests.html).
## Allure test report
- Test report example: ![](/img/allure-report.png)
- when run on GitHub Actions, an Allure report is created and uploaded on github pages: [Allure report](https://andgineer.github.io/e2e-tests/builds/tests/)## Usage
To start Selenium Grid and Allure reporter run:
docker-compose up -d
Your Selenium Grid console will be at `http://localhost:4444/ui/`.
The reports are available at `http://localhost:8800`.
#### Run tests
Tests should save results in folder `allure-results` mounted
to the Docker container with Allure reporter.Install dependencies (note: there are two dots),
run all tests from `tests` folder and create allure report:. ./activate.sh
scripts/test.shOur tests have a parameter `--host` to specify the URL of
the tested web application - see
[pytest hook pytest_addoption](https://docs.pytest.org/en/latest/how-to/writing_hook_functions.html#using-hooks-in-pytest-addoption)
in conftest.py.For example, to test `https://google.com` run:
scripts/test.sh --host=https://google.com
This will fail because there is no word "Python" on
the Google main page, unfortunately.