Geb Functional Testing for the Grails® framework.
This plugin provides the Geb dependencies and a create-functional-test
command for generating Geb tests in a Grails app.
For further reference please see the Geb documentation.
If you are looking for examples on how to write Geb tests, check:
Geb/Grails example project or Grails functional test suite where Geb tests are used extensively.
Grails comes with a set of pre-installed browser drivers.
To set up additional drivers you need to add the driver to your build.gradle
for example:
integrationTestRuntimeOnly "org.seleniumhq.selenium:selenium-edge-driver:$seleniumVersion"
You also need to add it to the GebConfig.groovy
file in the src/test/resources/
directory. For example:
/*
This is the Geb configuration file.
See: https://www.gebish.org/manual/current/#configuration
*/
/* ... */
import org.openqa.selenium.edge.EdgeDriver
environments {
/* ... */
edge {
driver = { new EdgeDriver() }
}
}
Now you can run your tests with the new driver by specifying the Geb environment:
./gradlew integrationTest -Dgeb.env=edge