{"id":13596263,"url":"https://github.com/bonigarcia/selenium-jupiter","last_synced_at":"2025-10-18T10:08:27.266Z","repository":{"id":21781468,"uuid":"94019756","full_name":"bonigarcia/selenium-jupiter","owner":"bonigarcia","description":"JUnit 5 extension for Selenium WebDriver","archived":false,"fork":false,"pushed_at":"2024-10-28T06:21:21.000Z","size":20391,"stargazers_count":235,"open_issues_count":2,"forks_count":53,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-10-29T17:23:44.073Z","etag":null,"topics":["appium","docker","java","jenkins","junit5","selenium","selenium-grid","selenium-webdriver","testing","vnc"],"latest_commit_sha":null,"homepage":"https://bonigarcia.dev/selenium-jupiter/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bonigarcia.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":null,"open_collective":"selenium-jupiter","ko_fi":null,"tidelift":null,"custom":"https://www.buymeacoffee.com/bonigarcia"}},"created_at":"2017-06-11T17:12:59.000Z","updated_at":"2024-10-28T06:21:19.000Z","dependencies_parsed_at":"2023-09-29T08:35:00.361Z","dependency_job_id":"1fc8978a-726d-4b7f-bd4d-858d1f853600","html_url":"https://github.com/bonigarcia/selenium-jupiter","commit_stats":{"total_commits":1841,"total_committers":19,"mean_commits":96.89473684210526,"dds":0.4910374796306355,"last_synced_commit":"8cf1a996c14e4028c0a1f5c49272145a3be581b4"},"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonigarcia%2Fselenium-jupiter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonigarcia%2Fselenium-jupiter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonigarcia%2Fselenium-jupiter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonigarcia%2Fselenium-jupiter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bonigarcia","download_url":"https://codeload.github.com/bonigarcia/selenium-jupiter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247401847,"owners_count":20933145,"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":["appium","docker","java","jenkins","junit5","selenium","selenium-grid","selenium-webdriver","testing","vnc"],"created_at":"2024-08-01T16:02:13.730Z","updated_at":"2025-10-18T10:08:27.253Z","avatar_url":"https://github.com/bonigarcia.png","language":"Java","funding_links":["https://opencollective.com/selenium-jupiter","https://www.buymeacoffee.com/bonigarcia","https://opencollective.com/selenium-jupiter/donate","https://opencollective.com/selenium-jupiter/contribute/backer-8132/checkout","https://opencollective.com/selenium-jupiter/contribute/sponsor-8133/checkout"],"categories":["Java","测试","testing"],"sub_categories":[],"readme":"[![Maven Central](https://img.shields.io/maven-central/v/io.github.bonigarcia/selenium-jupiter.svg)](https://search.maven.org/#search%7Cga%7C1%7Cg%3Aio.github.bonigarcia%20a%3Aselenium-jupiter)\r\n[![Build Status](https://github.com/bonigarcia/selenium-jupiter/workflows/build/badge.svg)](https://github.com/bonigarcia/selenium-jupiter/actions)\r\n[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=io.github.bonigarcia:selenium-jupiter\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=io.github.bonigarcia%3Aselenium-jupiter)\r\n[![codecov](https://codecov.io/gh/bonigarcia/selenium-jupiter/branch/master/graph/badge.svg)](https://codecov.io/gh/bonigarcia/selenium-jupiter)\r\n[![badge-jdk](https://img.shields.io/badge/jdk-17-green.svg)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)\r\n[![License badge](https://img.shields.io/badge/license-Apache2-green.svg)](https://www.apache.org/licenses/LICENSE-2.0)\r\n[![Backers on Open Collective](https://opencollective.com/selenium-jupiter/backers/badge.svg)](#backers)\r\n[![Sponsors on Open Collective](https://opencollective.com/selenium-jupiter/sponsors/badge.svg)](#sponsors)\r\n[![Support badge](https://img.shields.io/badge/stackoverflow-selenium_jupiter-green.svg?logo=stackoverflow)](https://stackoverflow.com/questions/tagged/selenium-jupiter?sort=newest)\r\n[![Twitter Follow](https://img.shields.io/twitter/follow/boni_gg.svg?style=social)](https://twitter.com/boni_gg)\r\n\r\n# [![][Logo]][Selenium-Jupiter]\r\n\r\n[Selenium-Jupiter] is an open-source Java library that implements a [JUnit 5] extension for developing [Selenium WebDriver] tests. Selenium-Jupiter uses several features of the Jupiter extension (such as parameters resolution, test templates, or conditional test execution). Thanks to this, the resulting Selenium-Jupiter tests follow a minimalist approach (i.e., the required boilerplate code for WebDriver is reduced) while providing a wide range of advanced features for end-to-end testing.\r\n\r\n## Documentation\r\nYou can find the complete documentation of Selenium-Jupiter [here][Selenium-Jupiter]. This site contains all the features, examples, and configuration capabilities of Selenium-Jupiter.\r\n\r\n## Local browsers\r\nSelenium-Jupiter can be used to control local browsers programmatically using Selenium WebDriver. To do that, we need to specify the flavor of the browser to be used by declaring `WebDriver` parameters in tests or constructors. For instance, we declare a `ChromeDriver` parameter to use Chrome, `FirefoxDriver` for Firefox, and so on. For instance:  \r\n\r\n```java\r\nimport static org.assertj.core.api.Assertions.assertThat;\r\n\r\nimport org.junit.jupiter.api.Test;\r\nimport org.junit.jupiter.api.extension.ExtendWith;\r\nimport org.openqa.selenium.chrome.ChromeDriver;\r\n\r\nimport io.github.bonigarcia.seljup.SeleniumJupiter;\r\n\r\n@ExtendWith(SeleniumJupiter.class)\r\nclass ChromeTest {\r\n\r\n    @Test\r\n    void test(ChromeDriver driver) {\r\n        driver.get(\"https://bonigarcia.dev/selenium-webdriver-java/\");\r\n        assertThat(driver.getTitle()).contains(\"Selenium WebDriver\");\r\n    }\r\n\r\n}\r\n```\r\n\r\nInternally, Selenium-Jupiter uses [WebDriverManager] to manage the WebDriver binaries (i.e., chromedriver, geckodriver,  etc.) required to use local browsers.\r\n\r\n### Browsers in Docker containers\r\nSelenium-Jupiter allows using browsers in [Docker] containers very easily. The only requirement is to get installed [Docker Engine] in the machine running the tests. The following example shows a test using this feature. Internally, it pulls the image from [Docker Hub], starts the container, and instantiates the WebDriver object to use it. This example also enables the recording of the browser session and remote access using [noVNC]:\r\n\r\n```java\r\nimport static io.github.bonigarcia.seljup.BrowserType.CHROME;\r\nimport static org.assertj.core.api.Assertions.assertThat;\r\n\r\nimport org.junit.jupiter.api.Test;\r\nimport org.junit.jupiter.api.extension.ExtendWith;\r\nimport org.openqa.selenium.WebDriver;\r\n\r\nimport io.github.bonigarcia.seljup.DockerBrowser;\r\nimport io.github.bonigarcia.seljup.SeleniumJupiter;\r\n\r\n@ExtendWith(SeleniumJupiter.class)\r\nclass DockerChromeTest {\r\n\r\n    @Test\r\n    void testChrome(@DockerBrowser(type = CHROME) WebDriver driver) {\r\n        driver.get(\"https://bonigarcia.dev/selenium-webdriver-java/\");\r\n        assertThat(driver.getTitle()).contains(\"Selenium WebDriver\");\r\n    }\r\n\r\n}\r\n```\r\n\r\n### Conditional tests\r\nSelenium-Jupiter provides the class-level annotation @EnabledIfBrowserAvailable to skip tests conditionally depending on the availability of local browsers. For example:\r\n\r\n```java\r\nimport static io.github.bonigarcia.seljup.Browser.SAFARI;\r\nimport static org.assertj.core.api.Assertions.assertThat;\r\n\r\nimport org.junit.jupiter.api.Test;\r\nimport org.junit.jupiter.api.extension.ExtendWith;\r\nimport org.openqa.selenium.safari.SafariDriver;\r\n\r\nimport io.github.bonigarcia.seljup.EnabledIfBrowserAvailable;\r\nimport io.github.bonigarcia.seljup.SeleniumJupiter;\r\n\r\n@EnabledIfBrowserAvailable(SAFARI)\r\n@ExtendWith(SeleniumJupiter.class)\r\nclass SafariTest {\r\n\r\n    @Test\r\n    void test(SafariDriver driver) {\r\n        driver.get(\"https://bonigarcia.dev/selenium-webdriver-java/\");\r\n        assertThat(driver.getTitle()).contains(\"Selenium WebDriver\");\r\n    }\r\n\r\n}\r\n\r\n```\r\n\r\n### Test templates\r\nTest templates are a special kind of test in which the same test logic is executed several times according to some custom data. In Selenium-Jupiter, the data to feed a test template is referred to as the _browser scenario_ (a JSON file by default).\r\n\r\n```java\r\nimport static org.assertj.core.api.Assertions.assertThat;\r\n\r\nimport org.junit.jupiter.api.TestTemplate;\r\nimport org.junit.jupiter.api.extension.ExtendWith;\r\nimport org.openqa.selenium.WebDriver;\r\n\r\nimport io.github.bonigarcia.seljup.SeleniumJupiter;\r\n\r\n@ExtendWith(SeleniumJupiter.class)\r\nclass TemplateTest {\r\n\r\n    @TestTemplate\r\n    void templateTest(WebDriver driver) {\r\n        driver.get(\"https://bonigarcia.dev/selenium-webdriver-java/\");\r\n        assertThat(driver.getTitle()).contains(\"Selenium WebDriver\");\r\n    }\r\n\r\n}\r\n```\r\n\r\n... and the browser scenario is:\r\n\r\n```yaml\r\n{\r\n   \"browsers\": [\r\n      [\r\n         {\r\n            \"type\": \"chrome-in-docker\",\r\n            \"version\": \"latest\"\r\n         }\r\n      ],\r\n      [\r\n         {\r\n            \"type\": \"chrome-in-docker\",\r\n            \"version\": \"latest-1\"\r\n         }\r\n      ],\r\n      [\r\n         {\r\n            \"type\": \"chrome-in-docker\",\r\n            \"version\": \"beta\"\r\n         }\r\n      ],\r\n      [\r\n         {\r\n            \"type\": \"chrome-in-docker\",\r\n            \"version\": \"dev\"\r\n         }\r\n      ]\r\n   ]\r\n}\r\n```\r\n\r\n### Reporting\r\nAs of version 6.3.0, Selenium-Jupiter provides built-in reporting capabilities through [ExtentReports]. This feature is enabled out of the box. All the tests executed with Selenium-Jupiter in the same suite will be reported (passed, skipped, failed) in a single HTML report per test suite execution. In addition, all the video recordings, both using `@DockerBrowser` and `@Watch`, will be gathered by Selenium-Jupiter and added to the resulting report (internally, the videos are encoded as Base64 in the HTML report), for example:\r\n\r\n![Test report with embedded recording](https://bonigarcia.dev/selenium-jupiter/img/selenium-jupiter-report-example-1.png)\r\n\r\nFinally, when a test fails, Selenium-Jupiter will gather two troubleshooting resources from the browser. First, it will try to take a screenshot of the browser (if it is still available). Second, it will try to gather the browser console logs, if possible. The screenshot(s) and the log(s) are automatically added for failed tests, for example:\r\n\r\n![Test report with gathered screenshots and browser console logs](https://bonigarcia.dev/selenium-jupiter/img/selenium-jupiter-report-example-2.png)\r\n\r\nYou can find a complete HTML report example in this [link].\r\n\r\n## Support\r\nSelenium-Jupiter is part of [OpenCollective], an online funding platform for open and transparent communities. You can support the project by contributing as a backer (i.e., a personal [donation] or [recurring contribution]) or as a [sponsor] (i.e., a recurring contribution by a company).\r\n\r\n### Backers\r\n\u003ca href=\"https://opencollective.com/selenium-jupiter\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/selenium-jupiter/backers.svg?width=890\"\u003e\u003c/a\u003e\r\n\r\n### Sponsors\r\n\u003ca href=\"https://opencollective.com/selenium-jupiter/sponsor/0/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/selenium-jupiter/sponsor/0/avatar.svg\"\u003e\u003c/a\u003e\r\n\u003ca href=\"https://opencollective.com/selenium-jupiter/sponsor/1/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/selenium-jupiter/sponsor/1/avatar.svg\"\u003e\u003c/a\u003e\r\n\u003ca href=\"https://opencollective.com/selenium-jupiter/sponsor/2/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/selenium-jupiter/sponsor/2/avatar.svg\"\u003e\u003c/a\u003e\r\n\r\nAlternatively, you can acknowledge my work by buying me a coffee:\r\n\r\n\u003cp\u003e\u003ca href=\"https://www.buymeacoffee.com/bonigarcia\"\u003e \u003cimg align=\"left\" src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" height=\"50\" width=\"210\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cbr\u003e\u003cbr\u003e\r\n\r\n## About\r\nSelenium-Jupiter (Copyright \u0026copy; 2017-2024) is a project created and maintained by [Boni García] and licensed under the terms of the [Apache 2.0 License].\r\n\r\n[Logo]: https://bonigarcia.dev/img/seljup.png\r\n[Selenium-Jupiter]: https://bonigarcia.dev/selenium-jupiter/\r\n[JUnit 5]: https://junit.org/junit5/docs/current/user-guide/\r\n[Selenium WebDriver]: https://www.selenium.dev/documentation/webdriver/\r\n[WebDriverManager]: https://github.com/bonigarcia/webdrivermanager\r\n[Docker]: https://www.docker.com/\r\n[Docker Engine]: https://www.docker.com/get-docker\r\n[Docker Hub]: https://hub.docker.com/\r\n[noVNC]: https://novnc.com/\r\n[OpenCollective]: https://opencollective.com/selenium-jupiter\r\n[donation]: https://opencollective.com/selenium-jupiter/donate\r\n[recurring contribution]: https://opencollective.com/selenium-jupiter/contribute/backer-8132/checkout\r\n[sponsor]: https://opencollective.com/selenium-jupiter/contribute/sponsor-8133/checkout\r\n[Boni Garcia]: https://bonigarcia.dev/\r\n[Apache 2.0 License]: https://www.apache.org/licenses/LICENSE-2.0\r\n[ExtentReports]: https://extentreports.com/\r\n[link]: https://bonigarcia.dev/selenium-jupiter/reports/selenium-jupiter-20250902-150317.html","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbonigarcia%2Fselenium-jupiter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbonigarcia%2Fselenium-jupiter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbonigarcia%2Fselenium-jupiter/lists"}