Coder Social home page Coder Social logo

bcdevops / bddstack Goto Github PK

View Code? Open in Web Editor NEW
3.0 4.0 11.0 782 KB

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: Apache License 2.0

Groovy 83.68% Dockerfile 16.32%
bdd bdd-framework geb spock openshift headless-tests testing test-automation test-automation-framework

bddstack's Introduction

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 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.

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’]
       }
   }
}

Questions and issues

Please ask questions on our Slack Channel and raise issues in BDDStack issue tracker.

Useful Linkss

http://www.gebish.org/manual/current

http://spockframework.org/

http://groovy-lang.org/

https://inviqa.com/blog/bdd-guide

https://github.com/SeleniumHQ/selenium/wiki

SourceSets:

bddstack's People

Contributors

agehlers avatar aj5fa1jgn1fatbw6fa0md5rrvbek2g avatar antony avatar beckje01 avatar bherrmann7 avatar bodiam avatar derekroberts avatar erdi avatar jachin avatar jonnybot0 avatar ldaley avatar lipnitsk avatar mapps-soga avatar markus-guenther avatar msgilligan avatar paulwellnerbou avatar radutta avatar rstens avatar sdelamo avatar shellyxuehan avatar snowch avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bddstack's Issues

Selection of Item in dropdown box fails in Safari

In our test suite we select a value from several drop down combo-boxes in our page:

selectProject { $("#opportunityForm") }
selectProject.project = Project

This works well in IE, Edge, Chrome (Headless) and Firefox (Headless), however it fails in Safari, with no additional error codes.

Firefox headless in GebConfig does not work

With the same setup in GebConfig for firefoxHeadless, it does not work !

o.addArguments("-headless")

We are running Selenium 3.11.0, geckoDriver 0.21.0 with firefox 61.0.1 (64 bits). All tests failed with CreateWebDriverException.

The normal firefox setup works well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.