{"id":16514741,"url":"https://github.com/andgineer/e2e-tests","last_synced_at":"2025-03-21T08:31:37.175Z","repository":{"id":145706716,"uuid":"176408604","full_name":"andgineer/e2e-tests","owner":"andgineer","description":"End-to-End pytest with Selenium Grid in docker compose","archived":false,"fork":false,"pushed_at":"2025-01-30T07:50:05.000Z","size":3860,"stargazers_count":12,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-17T23:04:03.156Z","etag":null,"topics":["docker","docker-compose","pytest","python","selenium","selenium-grid","tests"],"latest_commit_sha":null,"homepage":"https://sorokin.engineer/posts/en/e2e_tests.html","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andgineer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-19T02:39:41.000Z","updated_at":"2025-01-30T07:49:14.000Z","dependencies_parsed_at":"2024-10-28T10:14:27.871Z","dependency_job_id":"ea58def9-8779-4cd3-b2f8-8526dda791a8","html_url":"https://github.com/andgineer/e2e-tests","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andgineer%2Fe2e-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andgineer%2Fe2e-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andgineer%2Fe2e-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andgineer%2Fe2e-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andgineer","download_url":"https://codeload.github.com/andgineer/e2e-tests/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244765199,"owners_count":20506774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","pytest","python","selenium","selenium-grid","tests"],"created_at":"2024-10-11T16:13:39.466Z","updated_at":"2025-03-21T08:31:37.157Z","avatar_url":"https://github.com/andgineer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Github CI Status](https://github.com/andgineer/e2e-tests/workflows/ci/badge.svg)](https://github.com/andgineer/e2e-tests/actions)\n\n# End-to-End pytest with Selenium Grid in docker compose\n\nA robust end-to-end testing solution that runs tests in Chrome, Firefox, and Microsoft Edge \nusing headless browsers and Selenium Grid in Docker Compose. \n\nFeatures beautiful test reporting powered by [Allure](https://github.com/allure-framework/allure2).\n\nFor detailed implementation insights, check out my [blog post](https://sorokin.engineer/posts/en/e2e_tests.html).\n\n## Test Reporting\n\nThis framework generates comprehensive Allure reports:\n\n![Allure Report Example](/img/allure-report.png)\n\nWhen running on GitHub Actions, reports are automatically published to GitHub Pages: [View Latest Test Results](https://andgineer.github.io/e2e-tests/builds/tests/)\n\n## Getting Started\n\n### Setup\n\nLaunch Allure Server and Selenium Grid:\n\n    docker compose up -d\n\nThe Allure reports will be available at `http://localhost:8800`, \nand the Selenium Grid console at `http://localhost:4444/ui/`.\n\nThe Selenium Grid is started automatically by the tests (see `setup_selenium_grid()` in `conftest.py`), \nbut manually launching it in the background with `docker compose` makes tests faster since they don't need to start \nand stop the Grid for each test run.\n\n### Multiple Project Setup\n\nWhen using Selenium Grid across multiple projects, you may encounter port conflicts:\n\n    Bind for 0.0.0.0:4442 failed: port is already allocated\n\nThis happen if the Selenium Grid is already running.\n\nIn such cases, start Docker Compose without Selenium Grid:\n\n    docker compose up -d  --scale hub=0\n\n## Running Tests\n\n### Prerequisites\n\n1. Install dependencies:\n\n   . ./activate.sh\n\n2. Run tests and generate reports:\n\n   scripts/test.sh\n\nTests store results in the `allure-results` folder, which is mounted to the Allure reporter Docker container.\n\nTests run in parallel in Chrome, Firefox, and Microsoft Edge browsers with pytest fixture `browser`.\n\n### Testing Custom URLs\n\nThe framework supports testing any web application via the `--host` parameter. For example:\n\n    scripts/test.sh --host=https://google.com\n\nThe `--host` parameter is implemented using [pytest's hook pytest_addoption](https://docs.pytest.org/en/latest/how-to/writing_hook_functions.html#using-hooks-in-pytest-addoption) in `conftest.py`.\n\nNote: The Google example above will fail as it expects to find the word \"Python\" on the main page.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandgineer%2Fe2e-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandgineer%2Fe2e-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandgineer%2Fe2e-tests/lists"}