{"id":13772838,"url":"https://github.com/erik-whiting/LuluTest","last_synced_at":"2025-05-11T05:33:46.942Z","repository":{"id":46005596,"uuid":"202449262","full_name":"erik-whiting/LuluTest","owner":"erik-whiting","description":"LuluTest is a Python framework for creating automated browser tests.","archived":false,"fork":false,"pushed_at":"2024-06-18T01:28:23.000Z","size":1380,"stargazers_count":16,"open_issues_count":6,"forks_count":10,"subscribers_count":3,"default_branch":"development","last_synced_at":"2024-11-08T22:18:22.063Z","etag":null,"topics":["automation-selenium","hacktoberfest","hacktoberfest2022","python","testing","testing-framework"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erik-whiting.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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-08-15T01:04:46.000Z","updated_at":"2024-06-25T09:35:38.000Z","dependencies_parsed_at":"2022-08-25T09:20:17.110Z","dependency_job_id":"c0f7cd7e-3785-47af-b07b-6980c0c4724c","html_url":"https://github.com/erik-whiting/LuluTest","commit_stats":{"total_commits":240,"total_committers":14,"mean_commits":"17.142857142857142","dds":"0.19166666666666665","last_synced_commit":"c16d399d95d6521797691dd80a0bb8b65bdce192"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erik-whiting%2FLuluTest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erik-whiting%2FLuluTest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erik-whiting%2FLuluTest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erik-whiting%2FLuluTest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erik-whiting","download_url":"https://codeload.github.com/erik-whiting/LuluTest/tar.gz/refs/heads/development","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":["automation-selenium","hacktoberfest","hacktoberfest2022","python","testing","testing-framework"],"created_at":"2024-08-03T17:01:08.384Z","updated_at":"2024-11-17T08:30:32.233Z","avatar_url":"https://github.com/erik-whiting.png","language":"Python","funding_links":[],"categories":["UI Testing"],"sub_categories":[],"readme":"![Build Status](https://github.com/erik-whiting/LuluTest/actions/workflows/github-actions-ci.yml/badge.svg)\n[![Maintainability](https://api.codeclimate.com/v1/badges/08187c996085d530875f/maintainability)](https://codeclimate.com/github/erik-whiting/LuluTest/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/08187c996085d530875f/test_coverage)](https://codeclimate.com/github/erik-whiting/LuluTest/test_coverage)\n# LuluTest\nLuluTest is an open source browser automation framework using Python and Selenium.\nIt is relatively lightweight in that it mostly provides wrappers for 3rd party library methods that make browser automation and testing more intuitive.\nThe ultimate goal of LuluTest is to get people writing robust automated browser scripts quickly by abstracting out the inherent complexities and peculiarities\n\n## Special Thanks\nThe following Github users have contributed in some way to LuluTest and I want to thank them so much for their time, effort, and skill.\n\n@wangonya\n\n@nicpayne713\n\n@benjifs\n\n@alwinaind\n\n@ddrm86\n\n@MarioHdpz\n\n@FarhiaM\n\n@CarolinaKinetic\n\n## Basic Usage\n\nLuluTest is designed to support both white and black box testing. The functions\nprovided will work as long as the machine running the scripts can access the pages\nunder test. \n\nThe basic work flow for creating a test is as such:\n\n1. Create a `Page` object with the URL of the page to be tested.\n2. Create an `Action` object which will interact with elements\n3. Create an `Element` object for each element on the page that will be tested\n4. `go` to the page to be tested\n5. Create a `Steps` object of actions to take on a page\n6. `Do` the `Steps`\n7. Do your assertions\n\n### Example Usage\nBelow is an example test case:\n\n```python\nimport unittest\n\nfrom LuluTest.lulu_exceptions import PageNotLoadedError\nfrom LuluTest.page import Page\nfrom LuluTest.element import PageElement\nfrom LuluTest.action import Action\nfrom step import Step, Do, DoStep, Steps\n\n\nclass ExampleTest(unittest.TestCase):\n    def test_write_and_click(self):\n        page = Page('http://erikwhiting.com/newsOutlet')\n        actions = Action()\n        page.elements = [\n            PageElement((\"id\", \"sourceNews\"), \"input box\"),\n            PageElement((\"id\", \"transmitter\"), \"button\"),\n            PageElement((\"id\", \"en1\"), \"english div\")\n        ]\n        actions.go(page)\n        actions.input_text(page.get_element(\"input box\"), \"Hello\")\n        actions.click(page.get_element(\"button\"))\n        english_div = page.get_element(\"english div\")\n        english_text = actions.check_element_text(english_div, \"Hello\")\n        self.assertTrue(english_text)\n        actions.close()\n\n```\n\nAlternatively, you can also build pages via either YAML or JSON and import\nthem for use. For example, the above page can be modeled in `newso_outlet.yml`\nlike such:\n```yaml\npage:\n  url: http://erikwhiting.com/newsOutlet\n  elements:\n    input_box:\n      id: sourceNews\n    button:\n      id: transmitter\n    english_div:\n      id: en1\n```\nimport this file into your test script to avoid writing element finding code:\n```python\n# In a setup method:\nbase_path = os.getcwd()\nprebuilt_pages_directory = base_path + '/fixtures/pages/'\npage_configs = [\n    prebuilt_pages_directory + 'news_outlet.yml',\n    prebuilt_pages_directory + 'other_page.yml',\n    prebuilt_pages_directory + 'even_another_page.json',\n]\npages = page_factory.generate_pages(page_configs)\n\n# Now all subsequent tests have access to this page object\ndef test_basic_usage(self):\n    page = self.pages['news_outlet']\n    actions = Action()\n    actions.go(page)\n    actions.input_text(page.get_element(\"input_box\"), \"Hello\")\n    actions.click(page.get_element(\"button\"))\n    english_div = page.get_element(\"english_div\")\n    english_text = actions.check_element_text(english_div, \"Hello\")\n    self.assertTrue(english_text)\n    actions.close()\n```\n## Features\n\nThere are two main design philosophies driving the development of LuluTest:\n\n1. Hide the tedium and peculiarities inherent in browser automation\nfrom the test scripts themselves, allowing testers to write efficient\nand robust tests faster\n\n2. Simplify the test writing process as much as possible so non-technical\nusers can contribute basic test cases while freeing technical\nusers to focus on more technically complex issues.\n\nThese philosophies are implemented mostly by keeping the sometimes slow\nresponse time of web elements in mind. The project aims to avoid\nexplicit waits and sleeps as much as possible.\n\n## LuluTest Architecture\n\nBetween December of 2019 and January of 2020, the LuluTest architecture\nwas redesigned with better principles and implemented in a way as described\nin the picture below. If contributing, please do your best to adhere to the\nintended arhcitecture.\n\n![LuluTest Architecture](LuluTestArchitecture.PNG)\n\n## Future Work\n\nThe ultimate goal of LuluTest is to power a *domain specific language* to help\nfacilitate communication between business and technical stakeholders about\nrequirements and testing.\n\n## Contribution Guide\n\nPlease see the [Contribution Guide](./CONTRIBUTING.md)\n\n## Set-Up Guide\nFor setting up a local environment to contribute to testing, please go to the [Set-Up Guide](./SETUP.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferik-whiting%2FLuluTest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferik-whiting%2FLuluTest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferik-whiting%2FLuluTest/lists"}