This tiny demo demonstrates how to use Geb in combination with Spock for e2e testing.
### A Firefox will be launched for testing https://en.wikipedia.org/
$ ./gradlew test -DshowBrowser=true
The demo is minimized, so you won't have problems understanding what happens.
- Gradle as build tool, build.gradle contains the project's dependencies
- Spock as a Groovy testing framework
- Geb for browser automation (uses Selenium itself)
- Testing https://en.wikipedia.org/ is done in
WikipediaTest
-
There are two Geb pages
which are used as part of the test
-
- GebConfig.groovy sets up the selenium driver (WebDriverManager is being used here)
See https://github.com/geb/geb-example-gradle for a similar example, but created/maintained by the original Geb author(s).