7.4. Functional testing of web applications with Spock
The previous section covered functional tests for back-end Java applications that aren’t interactive. This section shows you how to test front-end applications that sport a web interface accessible via the browser.
For these kinds of tests, you need a way to control the browser and replicate the actions (for example, fill forms or click buttons) that a human user typically performs. Spock doesn’t have built-in support for this and instead collaborates with Geb, the Groovy browser automation library.
7.4.1. Browser automation with Geb
Geb is a library that provides a Groovy abstraction on top of the popular Selenium/WebDriver framework for automating a browser. If you’ve worked with Selenium, ...