Skip to content

This is the Geb, Spock Test stack as deployed at BCGOV, it supports Chrome and Firefox headless testing, which can be used in OpenShift pipelines. ***Warning: Default Branch is Develop, please clone from Latest Release for use in your project, or develop if you want to contribute.

License

Notifications You must be signed in to change notification settings

ShellyXueHan/BDDStack

 
 

Repository files navigation

Releases

BDDStack

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 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][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][navunit] (which is now deprecated). Please see the wiki for instructions on how to use your NavUnit Tests in BDDStack.

Please see the Wiki for more details.

Usage

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

./gradlew chromeTest
./gradlew chromeHeadlessTest //Will run in pipeline as well
./gradlew firefoxTest
./gradlew firefoxHeadlessTest //Will run in pipeline as well
./gradlew edgeTest //only on windows
./gradlew ieTest //Read wiki for set up instructions, only on windows
./gradlew safariTest //Only for MacOS, read wiki for instructions.

To run with all, you can run:

./gradlew test

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

Source-Sets

Gradle source sets

sourceSets {
   test {
       groovy {
           srcDirs = [‘src/groovy’]
       }
       resources {
           srcDirs = [‘src/resources’]
       }
   }
}

About

This is the Geb, Spock Test stack as deployed at BCGOV, it supports Chrome and Firefox headless testing, which can be used in OpenShift pipelines. ***Warning: Default Branch is Develop, please clone from Latest Release for use in your project, or develop if you want to contribute.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Groovy 100.0%