{"id":13772869,"url":"https://github.com/moyu6027/pytest-ui-automatic","last_synced_at":"2025-05-11T05:34:07.473Z","repository":{"id":159317376,"uuid":"411085183","full_name":"moyu6027/pytest-ui-automatic","owner":"moyu6027","description":"两种模式playwright与selenium结合的基于pytest的web ui测试框架, 支持page object与screen play双测试模型, BDD最佳实践的测试实现","archived":false,"fork":false,"pushed_at":"2022-10-16T10:16:30.000Z","size":25621,"stargazers_count":16,"open_issues_count":1,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-08-03T17:10:25.527Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/moyu6027.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":"2021-09-28T00:33:44.000Z","updated_at":"2024-06-19T03:10:02.000Z","dependencies_parsed_at":"2023-05-02T08:23:30.931Z","dependency_job_id":null,"html_url":"https://github.com/moyu6027/pytest-ui-automatic","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/moyu6027%2Fpytest-ui-automatic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moyu6027%2Fpytest-ui-automatic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moyu6027%2Fpytest-ui-automatic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moyu6027%2Fpytest-ui-automatic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moyu6027","download_url":"https://codeload.github.com/moyu6027/pytest-ui-automatic/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225017623,"owners_count":17407805,"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":[],"created_at":"2024-08-03T17:01:08.637Z","updated_at":"2025-05-11T05:34:07.446Z","avatar_url":"https://github.com/moyu6027.png","language":"Python","funding_links":[],"categories":["UI Testing"],"sub_categories":[],"readme":"# pytest-ui-automatic\n[Playwright Python](https://github.com/Microsoft/playwright-python) tool practice\npytest pytest-bdd screen-play page-object allure cucumber-report\n\n## How to run\n1. Run tests `execute_tests.sh`\n\n## Notes:\nPretty interesting and fast-growing tool for test automation. It can have some troubles with the first setup \n(especially with Docker), but generally this tool faster than Selenium and have pretty nice facade methods out of the box.\n\nIt's hard to say if I can recommend this tool to young Python AQA engineers because Selenium is a standard \nand supports by W3C. But if you have a small project, then it can be a wise choice to use Playwright.\n\n\n\n## Docker\nExecute tests - `docker-compose run tests`\n\nRebuild container - `docker-compose build --no-cache setup`\n\n## Cucumber Html Report\n\nnpm i cucumber-html-reporter\nnode generate-html-report.js\n\nnpm install multiple-cucumber-html-reporter \nnode generate-multiple-cucumber-html-report.js \n\n![cucumber report 1](cucumber-report-1.png)\n\n![cucumber report 2](cucumber-report-2.png)\n\n\n## Pytest BDD\n\npytest-bdd generate features/shop/shop_order_t_shirt.feature \u003e step_definition/shop/test_shop.py\n\nTest code generation helpers\nFor newcomers it's sometimes hard to write all needed test code without being frustrated. To simplify their life, simple code generator was implemented. It allows to create fully functional but of course empty tests and step definitions for given a feature file. It's done as a separate console script provided by pytest-bdd package:\n\npytest-bdd generate \u003cfeature file name\u003e .. \u003cfeature file nameN\u003e\nIt will print the generated code to the standard output so you can easily redirect it to the file:\n\npytest-bdd generate features/some.feature \u003e tests/functional/test_some.py\nAdvanced code generation\nFor more experienced users, there's smart code generation/suggestion feature. It will only generate the test code which is not yet there, checking existing tests and step definitions the same way it's done during the test execution. The code suggestion tool is called via passing additional pytest arguments:\n\npytest --generate-missing --feature features tests/functional","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoyu6027%2Fpytest-ui-automatic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoyu6027%2Fpytest-ui-automatic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoyu6027%2Fpytest-ui-automatic/lists"}