Making Web Tests Readable, Robust and Rapid
Tutorial: Groovy Functional Testing with Geb - Part 2
What is Geb?
Despite the focus of this article, it is important to establish straight away that Geb (pronounced “jeb”) is a browser automation tool, not a testing tool. Geb can be used to programmatically automate a web browser for any purpose whatsoever; it just so happens that web testing is the most common need the average programmer has for browser automation.
What sets Geb apart from just using WebDriver on its own? From Geb’s home page: “It brings together the power of WebDriver, the elegance of jQuery content selection, the robustness of Page Object modeling and the expressiveness of the Groovy language.” Furthermore, Geb provides first class support and integration with common testing frameworks and build tools, including JUnit, Spock, Grails, Maven and Gradle.
It should be noted that Geb’s user manual is top notch; any developer looking for more examples, detailed API documentation or setup guides would be well advised to check it out.