TurekBot / geb-example-gradle

An example project for using Geb in a Gradle build (Spock and JUnit 4)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example Geb and Gradle Project

Build Status

Description

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 and Chrome. Have a look at the build.gradle and the src/test/resources/GebConfig.groovy files.

Usage

The build is using a specific version of geckodriver and chromedriver which might seem outdated but are compatible with the versions of Firefox and Chrome installed in CI environments used by this project. Prior to running any builds you might need to update chromeDriverVersion and geckoDriverVersion extension variables in build.gradle to a more recent ones and ones which are compatible with the versions of Chrome and Firefox in your environment.

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

./gradlew chromeTest
./gradlew firefoxTest

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.

About

An example project for using Geb in a Gradle build (Spock and JUnit 4)

License:Apache License 2.0


Languages

Language:Groovy 86.2%Language:Shell 13.8%