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 a variety of browsers and we aim to add as many as possible. A JenkinsSlave image has been created that can run Chrome/Firefox Headless tests. This offers a viable option for replacing phantomJs in the OpenShift pipeline. Please see the JenkinsSlave Dockerfile setup. This repository also holds a Dockerfile for a CentOS based image that will run headless tests as well.
BDDStack is 100% compatible with the tests that were created in the previous incarnation of the framework called NavUnit (which is now deprecated). Please see the wiki for instructions on how to use your NavUnit Tests in BDDStack.
The following commands will launch the tests with the individual browsers:
./gradlew chromeTest
./gradlew chromeHeadlessTest //Will run in pipeline as well
./gradlew remoteChrome
./gradlew remoteFirefox
./gradlew remoteEdge
./gradlew remoteIe // not passing, possible test changes required
./gradlew remoteSafari // current drivers don't work well, test changes required
To run with all, you can run:
./gradlew test
Replace ./gradlew
with gradlew.bat
in the above examples if you're on Windows.
Please ask questions on our RocketChat channel and raise issues in BDDStack issue tracker.
http://www.gebish.org/manual/current