GithubHelp home page GithubHelp logo

gaugegrid's Introduction

Gauge with Selenium Grid

Build Status

This is a sample Gauge project that uses Selenium as the driver to interact with a web browser. It uses Selenium Grid to run tests on multiple browsers. This can also be used to run tests remotely, in different browsers, different platforms or even different versions of browsers.

Prerequisites

This example requires the following softwares to run.

  • Java 1.7 or above
  • Gauge
  • Gauge Java plugin
    • can be installed using gauge --install java
  • Firefox(>= v46)/Chromedriver in PATH

Setting the Selenium Grid

  • Download the latest version of Selenium Server here. Or, you can use the selenium server jar v2.53.1 present in resources directory of this repository.

To set up the Hub, run

java -jar <path_to_selenium_server_jar> -role hub

This uses port 4444 by default for its web interface.

To set up a node, run

java -jar <path_to_selenium_server_jar> -role webdriver -hub http://localhost:4444/grid/register/ -port 5566

You can use the free port of choice.

To check web console, go to http://localhost:4444/grid/console

If you are running hub and nodes in different machines, localhost should be replaced with IP address of hub. This should also be updated in project_dir/env/user.properties.

Run specs

  • Clone repository and run
mvn test

This runs the sample specs using the firefox driver by default. To run tests in Chrome browser, pass the -Dwebdriver.chrome.driver="<path_to_chrome_driver>" flag to selenium node. Then run specs using mvn test -Denv="chrome"

To use a different browser, set the environment property BROWSER in project_dir/env/user.properties.

BROWSER = chrome

gaugegrid's People

Contributors

apoorvam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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