Giter Club home page Giter Club logo

groovy-geb-spock-selenium's Introduction

Groovy-Geb-Spock-Selenium

This code is provided on an "AS-IS” basis without warranty of any kind, either express or implied, including without limitation any implied warranties of condition, uninterrupted use, merchantability, fitness for a particular purpose, or non-infringement. Your tests and testing environments may require you to modify this framework. Issues regarding this framework should be submitted through GitHub. For questions regarding Sauce Labs integration, please see the Sauce Labs documentation at https://wiki.saucelabs.com/. This framework is not maintained by Sauce Labs Support.

Environment Setup

  1. Global Dependencies
    $ brew install maven
    
  2. Sauce Credentials
    • In the terminal export your Sauce Labs Credentials as environmental variables:
    $ export SAUCE_USERNAME=<your Sauce Labs username>
    $ export SAUCE_ACCESS_KEY=<your Sauce Labs access key>
    
  3. Project Dependencies
    • Check that Packages are available
    $ cd Groovy-Geb-Spock-Selenium
    $ mvn test-compile
    
    • You may also want to run the command below to check for outdated dependencies. Please be sure to verify and review updates before editing your pom.xml file. The updated packages may or may not be compatible with your code.
    $ mvn versions:display-dependency-updates
    

Running Tests

Tests in Parallel:

  • Edit the gen.saucelabs.capabilities.json file with the configurations you'd like to run. Each line needs to be a valid json object and the file needs to end with a newline. As shown below.
{"browserName": "MicrosoftEdge", "platform": "Windows 10", "version": "20.10240"}
{"browserName": "Firefox", "platform": "Windows 10", "version": "42"}

Please refer to the Sauce Platform Configurator for more information.

  • Use the command below from the root of the project.
./run.sh

It will run the tests in your project with each of the configurations listed concurrently by configuration. i.e. all configurations will run at the same time. Individual test outputs will be routed to a log file named after the configuration in the project root folder.

==> {"browserName": "Firefox", "platform": "Windows 10", "version": "42"}.log
  • For debug/local runs the test suite will default to Firefox. Use the command below form project root folder to run tests locally.
mvn clean test

Sauce Labs Dashboard

Advice/Troubleshooting

  1. It may be useful to use a Java IDE such as IntelliJ or Eclipse to help troubleshoot potential issues.

Resources

Sauce Labs Documentation
SeleniumHQ Documentation
Groovy Documentation
Spock Documentation
Geb Documentation
Stack Overflow

groovy-geb-spock-selenium's People

Contributors

johnroach avatar mehmetg avatar mehmetg-sauce avatar ndmanvar avatar

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.