{"id":20038321,"url":"https://github.com/testleafinc/simba","last_synced_at":"2025-06-30T23:35:24.995Z","repository":{"id":65277888,"uuid":"569299539","full_name":"TestLeafInc/Simba","owner":"TestLeafInc","description":"Customized Playwright Framework for Web and API automation with scalability and powerful data engine.","archived":false,"fork":false,"pushed_at":"2022-11-23T03:57:59.000Z","size":35,"stargazers_count":40,"open_issues_count":0,"forks_count":23,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-31T05:19:19.699Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TestLeafInc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-22T14:15:39.000Z","updated_at":"2025-03-25T04:30:15.000Z","dependencies_parsed_at":"2023-01-16T05:00:42.750Z","dependency_job_id":null,"html_url":"https://github.com/TestLeafInc/Simba","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TestLeafInc/Simba","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TestLeafInc%2FSimba","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TestLeafInc%2FSimba/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TestLeafInc%2FSimba/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TestLeafInc%2FSimba/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TestLeafInc","download_url":"https://codeload.github.com/TestLeafInc/Simba/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TestLeafInc%2FSimba/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262868879,"owners_count":23377272,"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-11-13T10:27:47.133Z","updated_at":"2025-06-30T23:35:24.970Z","avatar_url":"https://github.com/TestLeafInc.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simba - Playwright Automation Framework\n\nSimba is Java based clean code playwright automation framework architected using several useful design patterns.\n\n## Software Dependencies\n\n\u003ctable\u003e\n  \u003cthead align=\"left\"\u003e\n    \u003ctr border: 2 px;\u003e\n      \u003ctd\u003e\u003cb\u003eDependency\u003c/b\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003cb\u003eVersion\u003c/b\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003cb\u003eFeature\u003c/b\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cb\u003ePlaywright\u003c/b\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003cb\u003e1.28.0\u003c/b\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003cb\u003eEnd to End Automation - Browser \u0026 API\u003c/b\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cb\u003eTestNG\u003c/b\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003cb\u003e7.4.0\u003c/b\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003cb\u003eThe Test Runner to execute suite\u003c/b\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cb\u003eJSON\u003c/b\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003cb\u003e20220924\u003c/b\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003cb\u003eCreate \u0026 Parse JSON Files for API\u003c/b\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cb\u003eApache POI\u003c/b\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003cb\u003e5.2.3\u003c/b\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003cb\u003eRead Excel files for test data\u003c/b\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cb\u003eData Faker\u003c/b\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003cb\u003e1.6.0\u003c/b\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003cb\u003eCreate runtime fake test data\u003c/b\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cb\u003eOwner\u003c/b\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003cb\u003e1.0.12\u003c/b\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003cb\u003eMinimize the properties file code\u003c/b\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cb\u003eExtent Reports\u003c/b\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003cb\u003e3.1.5\u003c/b\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003cb\u003eThe HTML reporting library\u003c/b\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n## Design Pattern Used\n\n * \u003cb\u003eFactory Pattern\u003c/b\u003e is used to reuse existing browser contexts instead of rebuilding them each time.\n * \u003cb\u003eBridge pattern\u003c/b\u003e is used to switch implementations between UI and API at runtime.\n * \u003cb\u003eDecorator pattern\u003c/b\u003e is used to assign extra behaviors like highlight, retry .. to pages \u0026 elements at runtime without breaking the code that uses these objects.\n * \u003cb\u003eChain of Responsibility pattern\u003c/b\u003e is used to navigate from a pattern/page to other.\n * \u003cb\u003eObserver pattern\u003c/b\u003e is used to switch to different data, browser on failure when retried.\n\n## Framework - How to design your new test?\n\n* \u003cb\u003eStep 1:\u003c/b\u003e Use the main source for the framework desaign.\n* \u003cb\u003eStep 2:\u003c/b\u003e Refer the test source for the sample test code (Salesforce).\n* \u003cb\u003eStep 3:\u003c/b\u003e Create your own app instance url and update the config.\n* \u003cb\u003eStep 4:\u003c/b\u003e Build your pages like the sample using the right method and locator.\n* \u003cb\u003eStep 5:\u003c/b\u003e Use the test data in your tests from faker or API or excel.\n* \u003cb\u003eStep 6:\u003c/b\u003e Build your tests using the pages\n* \u003cb\u003eStep 7:\u003c/b\u003e Once ready, run in the debug mode and look at the logs for details\n\n## Amazing Usecases that you should try !\n\n\u003cdetails\u003e\u003csummary\u003e✅  Single framework for both UI 🧭 and API Automation\u003c/summary\u003e\n\u003cul\u003e\n \u003c/br\u003e\n\u003cli\u003e\n    \u0026emsp;Single framework\u003c/b\u003e designed using bridge pattern to allow conversation between UI and API simultaneously.\n\u003c/li\u003e\n\u003cli\u003e\n    \u0026emsp;You can create data using API and use that data to your UI tests to make your tests independent.\n\u003c/li\u003e\n\u003cli\u003e\n    \u0026emsp;Your UI tests can execute the test and as part of the assertions, it make sense to validate using API.\n\u003c/li\u003e\n  \u003c/br\u003e\n  \n\n\u003c/ul\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e✅ Fastest test execution 🚀 with configurable speed control\u003c/summary\u003e\n\u003cul\u003e\n   \u003c/br\u003e\n   \u003cli\u003ePlaywright engine is comparatively (above 30% on average) faster than other UI automation frameworks.\n   \u003c/li\u003e\n   \u003cli\u003eSometimes it requires a slow down to eliminate the script flakiness with configurable speed included through the listeners.\n   \u003c/li\u003e\n  \u003c/br\u003e\n  \n  ```java\n    // Sample code to control your delays\n    setSlowMo(ConfigurationManager.configuration().slowMotion());\n  ```\n  \n\u003c/ul\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e✅  Debug Faster with Snaps, Videos 🎥 and Tracings with configurable options\u003c/summary\u003e\n\u003cul\u003e\n \u003c/br\u003e\n\u003cli\u003e\n    \u0026emsp; Playwright library\u003c/b\u003e provides full/partial snaps, videos (webm) and trace viewer that captures network calls.\n\u003c/li\u003e\n\u003cli\u003e\n    \u0026emsp; Our framework allows configuration for framework user to either plugin on demand for every run or failures.\n\u003c/li\u003e\n  \u003c/br\u003e\n  \n  ```java\n    // Sample code to control your delays\n    setRecordVideoDir(Paths.get(folderName));\n  ```\n\n\u003c/ul\u003e\n\u003c/details\u003e\n\u003cdetails\u003e\u003csummary\u003e✅  Automated logins 💡 to avoid too many login tests\u003c/summary\u003e\n\u003cul\u003e\n \u003c/br\u003e\n\u003cli\u003e\n    \u0026emsp;Configurable automated logins\u003c/b\u003e can avoid unnecessary login tests through storing the state of the user.\n\u003c/li\u003e\n\u003cli\u003e\n    \u0026emsp;The user can either use the existing login storage or decide to login automated through configuration.\n\u003c/li\u003e\n  \u003c/br\u003e\n\n  ```java\n  # Auto Login\n  auto.login = true\n  ```\n\u003c/ul\u003e\n\u003c/details\u003e\n\u003cdetails\u003e\u003csummary\u003e✅  Automated retries 🔁 with different browser and/or data\u003c/summary\u003e\n\u003cul\u003e\n \u003c/br\u003e\n\u003cli\u003e\n    \u0026emsp;Configurable retries\u003c/b\u003e with different data using the TestNG listener upon failure of the earlier data.\n\u003c/li\u003e\n\u003cli\u003e\n     \u0026emsp;Configurable retries\u003c/b\u003e with different browser using the TestNG listener upon failure of earlier browser.\n\u003c/li\u003e\n  \u003c/br\u003e\n\n  ```java\n  # Retry Switch\n  retry.data.switch = true\n  retry.browser.switch = false\n  ```\n\u003c/ul\u003e\n\u003c/details\u003e\n\u003cdetails\u003e\u003csummary\u003e✅  Automated test data generation/selection for your CRUD operations\u003c/summary\u003e\n\u003cul\u003e\n \u003c/br\u003e\n\u003cli\u003e\n    \u0026emsp;Java Faker\u003c/b\u003e is used to generate random test data for most of your CREATE requests.\n\u003c/li\u003e\n\u003cli\u003e\n    \u0026emsp;You can also use ENUM for the master data obtained using the API requests from server.\n\u003c/li\u003e\n\u003cli\u003e\n    \u0026emsp;For all idempotent requests, the framework allows you to read data using API, Excel.\n\u003c/li\u003e\n  \u003c/br\u003e\n  \n\n\u003c/ul\u003e\n\u003c/details\u003e\n\n## Framework - How does it execute tests?\n\n* \u003cb\u003eStep 01:\u003c/b\u003e You run your designed testng xml with listeners.\n* \u003cb\u003eStep 02:\u003c/b\u003e The testng annotations (@Before) initialize the setup.\n* \u003cb\u003eStep 03:\u003c/b\u003e The playwright script invokes the browser and actions.\n* \u003cb\u003eStep 04:\u003c/b\u003e Simulatenously, the reporting engine captures the result.\n* \u003cb\u003eStep 05:\u003c/b\u003e Upon success completion, the videos, reports are published.\n* \u003cb\u003eStep 06:\u003c/b\u003e Upon failure, the testng retry is invoked with different data/browser.\n* \u003cb\u003eStep 07:\u003c/b\u003e Step 02 - 06 continues until success or max retries.\n* \u003cb\u003eStep 08:\u003c/b\u003e Look at the results folder for html results.\n* \u003cb\u003eStep 09:\u003c/b\u003e Look at the videos for the exact details.\n* \u003cb\u003eStep 10:\u003c/b\u003e Share the traceviewer results to your developer through defect log.\n\n## 2023 Roadmap !\n\n* \u003cb\u003eSingle framework\u003c/b\u003e to switch from Playwright to Selenium or vice versa.\n* \u003cb\u003eDefect Management\u003c/b\u003e tools integration LIKE Jira and users choice.\n\n## License\n\nThe project is [MIT](./LICENSE) licensed.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestleafinc%2Fsimba","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftestleafinc%2Fsimba","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestleafinc%2Fsimba/lists"}