Giter Club home page Giter Club logo

weatherchecker's Introduction

WeatherChecker

Cucumber automation example project for the Weather Checker site.

Framework Reference
Ruby Cucumber https://github.com/cucumber/cucumber-ruby
Capybara automation framework for Selenium https://github.com/teamcapybara/capybara
SitePrism Page Object Model https://github.com/site-prism/site_prism

Set up

The project can be executed in 2 different ways depending on your local dev environment set up. It has been assumed to be run in a Mac OS or Linux environment.

git clone [email protected]:itsDanOades/WeatherChecker.git

Run tests using Ruby and local browser

Spawn a browser instance on your local dev machine and execute Cucumber tests using Selenium Webdriver

Prerequisites

Set up Ruby

# Download and install latest stable version
curl -sSL https://get.rvm.io | bash -s stable --ruby

# Confirm your Ruby install
rvm list
ruby -v
  • Install Ruby project dependencies
gem install bundler
bundle install

Note: The bundle install step will download and install the correct Chromedriver or Geckodriver version for your local browser. If this fails then you will need to ensure your chosen driver is available on your system path or follow the Docker solution below.

Run Feature Tests

# Launch Chrome
bundle exec cucumber -p default -p chrome

# Launch Firefox
bundle exec cucumber -p default -p firefox

Run tests using Docker and Selenium Grid

Start a Docker container running an instance of Selenium Grid and a Google Chrome node, execute Cucumber tests inside Docker, use this approach if you do not want to set up Ruby on your local machine.

Prerequisites

Build Docker Container

  • Build the test runner Docker container using Dockerfile and public Ruby docker image from https://hub.docker.com/
sh ./build_docker.sh
  • Confirm docker cucumber:0.0.1 image was built and tagged successfully in your local docker repo
docker images

Run Feature Tests

Start automation framework and execute tests headlessly inside docker node

sh ./run_cucumber_docker.sh

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.