Wiki Article
Draft:Geb (testing framework)
Nguồn dữ liệu từ Wikipedia, hiển thị bởi DefZone.Net
| Review waiting, please be patient.
This may take 6 weeks or more, since drafts are reviewed in no specific order. There are 2,761 pending submissions waiting for review.
Where to get help
How to improve a draft
You can also browse Wikipedia:Featured articles and Wikipedia:Good articles to find examples of Wikipedia's best writing on topics similar to your proposed article. Improving your odds of a speedy review To improve your odds of a faster review, tag your draft with relevant WikiProject tags using the button below. This will let reviewers know a new draft has been submitted in their area of interest. For instance, if you wrote about a female astronomer, you would want to add the Biography, Astronomy, and Women scientists tags. Editor resources
Reviewer tools
|
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages)
|
| Geb | |
|---|---|
| Original authors | Luke Daley, Marcin Erdmann |
| Developers | Luke Daley, Marcin Erdmann |
| Stable release | 8.0.1
/ November 11, 2025 |
| Type | Test framework |
| License | Apache 2.0 |
| Website | groovy |
| Repository | github |
Geb (pronounced "jeb") is a functional test framework for browser web applications. It is backed by the Selenium WebDriver. The tests are written in the Groovy programming language. The test code syntax uses Groovy DSL that allows describing Page Object models (entire pages and their modules) in a declarative style.[1]
The framework can be integrated with test engines such as Spock, JUnit, and TestNG.[2]
Selecting web content
[edit]The content of a web page is usually selected via the $ method, which returns an object of the Navigator class. Such an object can wrap one or more objects of the WebDriver WebElement interface and provides additional functionality. The method uses the jQuery style, e.g., the call $("div", 3, title: "section") returns the fourth (indexing begins with 0) DIV element with a title attribute value of "section".
Page object pattern support
[edit]Geb Page Object models can describe both entire pages and modules that can be shared among different pages, such as navigation bars and footers. The model classes extend the library Page and Model classes.
The special Groovy DSL supports the declarative style and uses nested code blocks in braces, reflecting the elements hierarchy.
Integration with other tools
[edit]As a WebDriver wrapper, Geb allows direct access to its functionality when needed. Also, since it implements the WebDriver protocol, it can be integrated with Appium and thus supports mobile testing.
Spock, JUnit, and TestNG test engines can be used to run Geb-based tests.
See also
[edit]- Selenium (software), an umbrella project for a range of tools and libraries aimed at supporting browser automation
- Spock (testing framework), a testing, specification, and mocking framework (test engine)
References
[edit]- ^ Muschko, Benjamin (19 February 2014). Gradle in Action. Manning. ISBN 978-1-61729-130-2.
- ^ Fletcher, Rob (May 2017). Spock: Up and Running. O'Reilly Media, Inc. ISBN 978-1-4919-2328-3.
Category:Cross-platform software Category:Java development tools Category:Java platform Category:Graphical user interface testing Category:Software using the Apache license
