Skip to content


Subversion checkout URL

You can clone with
Download ZIP
An example project for using Geb in a Gradle build (Spock and JUnit 4)
Branch: master

Merge pull request #21 from Markus-Guenther/patch-1

Update Link to geb configuration documentation
latest commit 8380303b40
@erdi erdi authored

Build Status


This is an example of incorporating Geb into a Gradle build. It shows the use of Spock and JUnit 4 tests.

The build is setup to work with Firefox, Chrome and PhantomJS. Have a look at the build.gradle and the src/test/resources/GebConfig.groovy files.


The following commands will launch the tests with the individual browsers:

./gradlew chromeTest
./gradlew firefoxTest
./gradlew phantomJsTest

To run with all, you can run:

./gradlew test

Replace ./gradlew with gradlew.bat in the above examples if you're on Windows.

Questions and issues

Please ask questions on Geb user mailing list and raise issues in Geb issue tracker.

Something went wrong with that request. Please try again.