{"id":20630708,"url":"https://github.com/sysgears/selenium-automation-bundle","last_synced_at":"2025-07-28T18:13:20.362Z","repository":{"id":66053092,"uuid":"127424190","full_name":"sysgears/selenium-automation-bundle","owner":"sysgears","description":"Selenium Automation Bundle is an extendable and adaptable solution that simplifies automated testing to help focus on writing tests with Selenide and TestNG using the best test design patterns.","archived":false,"fork":false,"pushed_at":"2019-05-28T07:01:19.000Z","size":4639,"stargazers_count":39,"open_issues_count":2,"forks_count":15,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-03-28T23:21:56.099Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Groovy","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/sysgears.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-03-30T12:10:45.000Z","updated_at":"2024-11-26T12:32:27.000Z","dependencies_parsed_at":"2024-01-23T21:35:32.590Z","dependency_job_id":null,"html_url":"https://github.com/sysgears/selenium-automation-bundle","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/sysgears%2Fselenium-automation-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysgears%2Fselenium-automation-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysgears%2Fselenium-automation-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysgears%2Fselenium-automation-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sysgears","download_url":"https://codeload.github.com/sysgears/selenium-automation-bundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249126450,"owners_count":21216784,"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-16T14:09:20.256Z","updated_at":"2025-04-15T18:22:39.535Z","avatar_url":"https://github.com/sysgears.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Selenium Automation Bundle\n\nSelenium Automation Bundle is a seed project for Quality Assurance engineers to help them start designing, writing,\nand running automated data-driven tests with Selenide, TestNG, and Allure.\n\n## Features\n\n - Automatic initialization of Selenium WebDriver for Chrome, Firefox, Edge, and Safari\n - Structured test reports with detailed logs of test execution generated with the help of Allure\n - Integrated Selenide for handling dynamic behavior on your pages and for writing less code in page objects\n - Custom annotations for accessing and mapping test data stored in a tree-like structure to streamline data-driven testing\n - A simple mechanism to add your own CLI commands for running tests or handling test data\n - Groovy support to write concise test classes and page objects\n\n## Technologies\n\n* Selenium\n* Selenide\n* TestNG\n* Allure\n* Groovy\n* aShot\n\n## Wiki\n\nYou can consult the [Wiki] or [docs] to know more about writing tests and general use of the bundle. For start, you\ncan follow to the documents below:\n\n* [Introduction to Writing Tests with Selenium Automation Bundle]\n* [Detailed Guide to Writing Tests with Selenium Automation Bundle]\n* [Data Driven Testing with Selenium Automation Bundle]\n\n## What You Should Know Before Using Selenium Automation Bundle\n\nSelenium Automation Bundle is built around Selenium ecosystem, which is why you should have a basic understanding of\nJava, Selenium, and TestNG. The core modules of the bundle are actually written in Groovy, but you can still use Java to\nwrite test classes and page objects.\n\n## Installing the Bundle and Running the Tests\n\nIn this section, you're going to install Selenium Automation Bundle on your computer, run the tests, and view the test\nresults in the browser.\n\n## Prerequisites\n\n### Java\n\nInstall Java 8.\n\n### Google Chrome\n\nGoogle Chrome is the default browser that we’re using with Selenium Automation Bundle. Make sure that you have the\nlatest version of Chrome before you run the demo tests later in this guide.\n\n### IDE\n\nYou can use any favorite IDE such as Intellij IDEA, Eclipse, or NetBeans when working with the bundle.\n\n## Clone Selenium Automation Bundle\n\nClone the repository using the following command:\n\n```bash\ngit clone https://github.com/sysgears/selenium-automation-bundle.git\n```\n\n## Run the Demo Tests\n\nThere are several test examples to help you get started. To run them, change the current working directory:\n\n```bash\ncd selenium-automation-bundle\n```\n\nAnd now you can run the demo tests using the command below:\n\n```bash\n./gradlew\n```\n\n\u003e Note that if you're using Windows, you should execute `gradlew.bat` instead of `./gradlew`.\n\nThe [Gradle Wrapper] will take it from here: It will run the demo tests in Chrome and show a confirmation in the\nterminal that the tests were completed. During the execution of the demo tests, Chrome will automatically open and close several times.\n\nOnce the tests are completed, you can generate and serve a report to your default browser by running the following\ncommands:\n\n```bash\n./gradlew downloadAllure\n./gradlew allureServe\n```\n\nCongratulations, you've just started using Selenium Automation Bundle!\n\n## Why Was Selenium Automation Bundle Created?\n\nAs a Quality Assurance specialist, you have to take several steps before you can write automated tests for a web\napplication. You usually have to:\n\n* Determine what approaches and patterns should be used to write tests.\n* Find the best tools to write and run tests, handle test data, and create test reports.\n* Configure the tools and make them work together efficiently.\n* Create your own abstractions and tools to fulfill basic testing tasks.\n\nHowever, you can avoid all that hassle by using Selenium Automation Bundle.\n\nSelenium Automation Bundle is basically a fully prepared infrastructure that helps you to start writing automated tests\ninstantly. The infrastructure is built of many classes that make it simple to create tests and page objects, interact\nwith databases and REST API, handle test data, and fulfill other important tasks.\n\nYou can also adapt the bundle to your specific requirements. In other words, you retain full control over the provided\ntools, and you can configure them and add your own libraries as you need.\n\nThe main idea is to give you the tools and approaches to carry out most of the tasks for automated testing, so you don't\nhave to make decisions every time you start a new project for your tests.\n___\n\nHaving explained _why_ the bundle exists, let's discuss _what exactly_ it provides. Below, you'll find more information\nabout the [bundle structure](#project-structure), as well as the [patterns](#patterns), [libraries](#core-stack), and\n[abstractions](#other-libraries-and-abstractions) that the bundle is built around.\n\n## Project Structure\n\nThe directory structure of Selenium Automation Bundle is typical of Groovy-based projects generated with Gradle.\nHere's what the project looks like (note that several unimportant directories aren't shown in the diagram):\n\n```\nselenium-automation-bundle\n├── allure/\n├── .gradle\n├── build\n    ├── allure-results/\n    ├── reports/\n        ├── allure-report\n        └── tests/\n            └── test/\n├── gradle/\n├── src/\n    ├── main/\n        ├── groovy/com/sysgears/seleniumbundle/\n            ├── core/\n            ├── pagemodel/\n            └── Main.groovy\n        └── resources/\n            └── config/ApplicationProperties.groovy\n    └── test/\n        ├── groovy/com/sysgears/seleniumbundle/\n            ├── common/\n            ├── listeners/\n            └── tests/\n        └── resources/\n            ├── data/\n            └── testng.xml\n├── .gitignore\n├── build.gradle\n├── gradle.properties\n├── gradlew\n├── gradlew.bat\n├── LICENSE\n├── README.md\n└── settings.gradle\n```\n\nIn the table below, we discuss only the key directories and files that you'll use when writing tests with the bundle.\n\n| Directory or File | Purpose |\n|----------|----------|\n| `build/`    | The build code and test reports are generated into this directory. |\n| `build/reports/` | The `reports` directory will contain the test reports generated by TestNG and Allure. |\n|----------|----------|\n| `src/main/` | *Bundle Code* |\n| `src/main/.../core/` | Contains the bundle code. You don't need to change anything in `core/` unless you want to add a very specific functionality for your test project. |\n| `src/main/.../pagemodel/` | Stores page objects. You can view the demo page objects and put your page objects in this directory. |\n| `src/main/resources/config/ApplicationProperties.groovy` | Stores the global application properties. You can set the base URL for your app or change the browser for running tests in this file. |\n|----------|----------|\n| `src/test/` | *Test-Related Code* |\n| `src/test/.../common/` | Contains the basic test classes such as `BaseTest` and `FunctionalTest`, which provide default configurations for your tests. You can add more methods to these test classes or create your own classes to fulfill other basic test tasks. |\n| `src/test/.../tests/` | Contains all kinds of tests for your app. You can put your functional, end-to-end, integration, and UI tests into this directory. |\n| `src/test/resources/data/` | Stores YAML files with test data easily accessible from test classes with custom annotations to help to use the data driven testing approach. |\n| `src/test/resources/testng.xml` | Provides default TestNG configurations. You may need to update `testng.xml` to change test suites or classes to run. You can also add new XML files with specific TestNG configurations next to `testng.xml`. |\n|----------|----------|\n| `build.gradle` | Stores build configurations. You can find the list of dependencies, plugins, and Gradle tasks in this file. |\n| `gradle.properties` | Contains various project properties. For example, you can change the groups of tests, which should run, in this file. |\n| `LICENSE` | License information. |\n| `README.md` | The document you are reading now. |\n\u003cbr /\u003e\n\n## Patterns\n\n### Page Object Pattern\n\nThe page object pattern was first introduced by Selenium community, and it encourages [the reuse of code and the\nseparation of test code from the presentation]. You can encapsulate repetitive code that works with HTML elements in\npage object methods and then reuse them in your tests. Page objects also don't contain any test code to make it simple\nto maintain the tests. To learn more about page objects, you can consult [this article].\n\n### Data-Driven Testing\n\nSelenium Automation Bundle suggests using the [data-driven approach] for creating tests. Internally, the bundle uses\nTestNG in conjunction with custom annotations and classes to implement the Data-Driven Testing pattern. As a result,\nit'll be easier for you to access test data (stored in a tree-like structure in YAML files) and map data to test classes.\n\n## Technology Stack\n\nThe core of Selenium Automation Bundle consists of the following tools: Selenide (includes Selenium), TestNG, and\nAllure. With these tools, you can fulfill roughly 90% of testing tasks: write and run tests, and generate test reports.\n\nBut the bundle gives you much more. For example, UI testing is greatly simplified thanks to the _automatic_ comparison\nof screenshots of the user interface. For that, we've integrated [aShot](#taking-and-comparing-screenshots) into the\nbundle.\n\nFurther below, we give more details about the bundle abstractions and included tools. Naturally, if you’re familiar with\nany library that we integrated into the bundle, you may skip the section about it.\n\n### Core Stack\n\n#### Selenium\n\nYou may consider Selenium a medium between the browser and your web application. Selenium lets you handle browsers when\ntesting your app. We recommend that you refresh your memory about [Selenium WebDriver]. You can also consult\n[this guide] to learn more about the main Selenium concepts.\n\n#### Selenide\n\nSelenide is a framework built around Selenium, and it provides simple methods to find and manipulate elements on an\nHTML page, and, more importantly, to handle pages that _change dynamically_. With Selenide, you’ll write less code\n[than with Selenium].\n\n#### TestNG\n\nTestNG is a framework that manages the testing process. You should be familiar with these three aspects of TestNG: how\nto [configure TestNG], how to use [its annotations], and how to create [test groups]. Additionally,\nyou may want to run through a [TestNG tutorial].\n\n#### Allure\n\nAllure can generate HTML-based [reports] with full logs and timeline to help inspect test results presented in suites or\ndiagrams. Additionally, Allure can serve reports to your favorite browser and work with various Continuous Integration\nsystems.\n\n#### Groovy\n\nGroovy is a programming language for the Java platform, and it features [simpler syntax than Java]. Although Selenium\nAutomation Bundle is written in Groovy, you can still use Java as the main language to create page objects and test\nclasses, or write any additional code.\n\n### Other Libraries and Abstractions\n\n#### Taking and Comparing Screenshots\n\nUI testing can be complicated, but Selenium Automation Bundle makes it easy by including the [aShot] library. Although\nSelenium allows you to take screenshots of the UI, its functionality is rather limited. aShot, on the other hand, can\ntake screenshots of particular elements, viewports, or entire pages, and highlight elements. The bundle provides custom\nmethods to seamlessly incorporate screenshot comparison with aShot directly into your tests.\n\n#### Communicating with REST API\n\nThe bundle defines a few convenient methods, which you can use to intercept and send HTTP requests. You can easily tap\ninto the network traffic between the client code and the server in order to, for example, verify if correct requests\nwere sent by the client.\n\n#### Connecting to Cloud Storage\n\nSelenium Automation Bundle comes with its own methods and commands to let you move test data such as page screenshots\nand video recordings to and from cloud storage such as Dropbox.\n\n#### Working with MongoDB\n\nThe bundle implements methods and commands so you can work with MongoDB directly from your tests. For example, the\nmethods can be used to verify if the app state, stored in MongoDB, was changed as expected after running the tests.\n[MongoDB Java Driver] is used for this functionality.\n\n#### Debugging with Video Recorder\n\nVideo Recorder is a simple library sometimes necessary to debug tests. When some of your tests fail, it can be quite\ndifficult to figure out why that happened. But with Video Recorder, you can record all the dynamic changes that happen\non the web page during testing. Video Recorder has [a simple API for TestNG] which you may have a look at.\n\n___\n\n## License\n\nCopyright © 2016, 2017 [SysGears INC]. This source code is licensed under the [MIT] license.\n\n[mit]: LICENSE\n[sysgears inc]: https://sysgears.com\n[wiki]: https://github.com/sysgears/selenium-automation-bundle/wiki\n[docs]: https://github.com/sysgears/selenium-automation-bundle/tree/master/docs\n[introduction to writing tests with selenium automation bundle]: https://github.com/sysgears/selenium-automation-bundle/wiki/Intro-to-Writing-Tests\n[detailed guide to writing tests with selenium automation bundle]: https://github.com/sysgears/selenium-automation-bundle/wiki/Guide-to-Writing-Tests\n[Data Driven Testing with Selenium Automation Bundle]: https://github.com/sysgears/selenium-automation-bundle/blob/master/docs/Introduction%20to%20Data%20Driven%20Testing.md\n[gradle wrapper]: https://docs.gradle.org/current/userguide/gradle_wrapper.html\n[the reuse of code and the separation of test code from the presentation]: https://www.seleniumhq.org/docs/06_test_design_considerations.jsp#page-object-design-pattern\n[this article]: https://martinfowler.com/bliki/PageObject.html\n[data-driven approach]: https://www.guru99.com/data-driven-testing.html\n[selenium webdriver]: https://www.seleniumhq.org/docs/03_webdriver.jsp\n[this guide]: https://wiki.saucelabs.com/display/DOCS/Getting+Started+with+Selenium+for+Automated+Website+Testing\n[than with selenium]: https://github.com/codeborne/selenide/wiki/Selenide-vs-Selenium\n[configure testng]: http://testng.org/doc/documentation-main.html#testng-xml\n[its annotations]: http://testng.org/doc/documentation-main.html#annotations\n[test groups]: http://testng.org/doc/documentation-main.html#test-groups\n[testng tutorial]: https://www.guru99.com/all-about-testng-and-selenium.html\n[reports]: https://docs.qameta.io/allure/#_report_structure\n[a simpler syntax than Java]: http://groovy-lang.org/differences.html\n[ashot]: https://github.com/yandex-qatools/ashot\n[mongodb java driver]: http://mongodb.github.io/mongo-java-driver/3.8/driver/getting-started/quick-start/\n[a simple api for testng]: http://automation-remarks.com/video-recorder-java/#_testng\n[introduction to writing tests]: https://github.com/sysgears/selenium-automation-bundle/wiki/Intro-to-Writing-Tests","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysgears%2Fselenium-automation-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsysgears%2Fselenium-automation-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysgears%2Fselenium-automation-bundle/lists"}