Giter Site home page Giter Site logo

opencredo / ruby-acceptance-testing-quickstart Goto Github PK

View Code? Open in Web Editor NEW
26.0 7.0 8.0 43 KB

A quickstart project to start web acceptance testing within minutes.

Home Page: https://opencredo.com/blogs/ruby-acceptance-testing-framework/

License: MIT License

Ruby 69.00% Gherkin 29.19% Shell 1.82%
blog-article

ruby-acceptance-testing-quickstart's Introduction

Ruby Acceptance Testing Quickstart

Web acceptance testing - where do you start? This is a quickstart project with good practice that you can clone and extend, rather than having to google constantly to find out the basics. There's some very powerful stuff included in this project which is ready to use out of the box, including parallel execution, browserstack integration, and aliased random data persistence.

Features

  • Acceptance tests written in plain English
  • Page Object pattern
  • Parallel test execution
  • Test data persistence across cucumber step definitions
  • Powerful DSLs to enforce good practice and terse code
  • Switchable drivers / browsers
  • BrowserStack support for remote execution
  • Headless browser testing
  • Aliased and randomised data generation to prevent data collisions
  • Rake execution tasks

Dependencies

Make sure you have the following installed before starting:

If you're using OSX, Phantom.js and Chromedriver are available via Homebrew.

Key Tools

  • Ruby - a dynamic, simple programming language.
  • Rake - a build utility for Ruby.
  • Cucumber - a BDD tool for writing acceptance tests in plain English.
  • Capybara - a driver-agnostic web acceptance test framework and DSL.
  • SitePrism - a page object DSL for Capybara.
  • Poltergeist - a Capybara driver for the headless browser Phantom.js.
  • Selenium WebDriver - Browser automation framework.
  • BrowserStack - Platform as a service based cross browser/OS test execution.
  • RSpec Expectations - a powerful assertions DSL.
  • Parallel_Tests - A gem for parallel threading of cucumber tests.
  • Factory Girl - A data template factory for producing test data.
  • FFaker - A random data generation library.
  • Relish - Automatic feature documention generation for Cucumber

Installing and using

From the command line:

  1. Clone the project: git clone https://github.com/burythehammer/ruby-acceptance-testing-quickstart
  2. Navigate to the folder and bundle install to install all necessary gems.
  3. Start running tests using the available rake tasks.

Available Rake Tasks

rake demo will run a headless browser test.

rake parallel_demo will execute a demo parallel test.

To specify your browser, use the following (hopefully self-explanatory) tasks:

  • rake firefox
  • rake chrome
  • rake phantomjs
  • rake parallel_firefox
  • rake parallel_chrome
  • rake parallel_phantomjs

Or if you wish to run every browser, you can run rake crossbrowser.

Browserstack Configuration

Browserstack is available via rake browserstack. You will need to set up your environment variables via the .env file first, to specify your login credentials and required browser/OS. To use this as part of a secure CI environment, Browserstack have an excellent guide on their website to keep your credentials secure.

ruby-acceptance-testing-quickstart's People

Contributors

burythehammer avatar night0wl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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