0.0
No commit activity in last 3 years
No release in over 3 years
Standalone generator for a lightly configured web_step rich cucumber capybara chromedriver test enviroment: cuke-island <test folder>
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

= 2.0.2
= 1.2.1
= 10.0.3
= 2.13.0
= 0.17.0
 Project Readme

Improved Standalone Cucumber Test Suite

Introduction

We here at Carney+Co have not discovered how to limit ourselves to Rails only projects yet so we have come up with a simple generator gem that will create a standalone cucumber test inviroment in a folder of our choice. This is a kind of one stop method with the exception of some depdendencies to have the best and easiest to maniupulate test evnironment possible.

I have expanded this work from the original Author Todd Huss from which this project is forked. I basically added in some extra smarts from the internets to integrate webkit and chromedriver to the installation.

Some enhancements over the parent are a nice growing list of generic web_steps and file handling capabilities for downloading and uploading files to your sites.

blogs.kent.ac.uk/webdev/2012/08/02/using-capybara-webkit-with-cucumber-without-rails-or-rack/

And

collectiveidea.com/blog/archives/2011/09/27/use-chrome-with-cucumber-capybara/

I have also upgraded all the associated gems from the parent project so this install is far easier to get running out of the box

Changelog

0.0.8 Added file features for static files not previously downloaded and a simple helper to path to those files. Also began CSS class matching of elements by id. Added web_steps for select option handling

0.0.7 File download handling through file_steps - This provides a waiting mechanism inspired by collectiveidea.com/blog/archives/2012/01/27/testing-file-downloads-with-capybara-and-chromedriver/

0.0.6 Configuration of Capybara.app_host from command line and existing deployed test instance upgrade strategy

0.0.5 Added more web_steps

0.0.4 First Version

From the original author

I’ve included a simple search.feature examples that uses Google. To switch to use your own development or staging server adjust the URL in features/support/env.rb. I have this example project setup to use Capybara with Webdriver (Selenium) but you can easily switch this to use Culerity or Webrat by editing features/support/env.rb.

Pull requests with updates/enhancements/bug fixes are always welcome!

Project Layout

  • features/*.feature : cucumber features

  • features/step_definitions/web_steps.rb : generic steps that apply to all features

  • features/step_definintions/[feature]_steps.rb : steps specific to an individual feature file

  • support/env.rb : configures the driver and the hostname to use

Prerequisites

Configuration

  • Bundle Install runs automatically once the test environment is setup

Setting up a test enviornmnet

  • gem install cuke-island

  • cuke-island <Directory to house testing files> [<Domain Name (google.com)>]

    • This second option will replace the Capybara.app_host = ‘www.google.com’ with your value.

Running Features

  • To run all features: cucumber

  • Or to add some options: rake

  • To use bundled gems: bundle exec cucumber

  • To run a specific feature: cucumber features/search.feature

Debugging

  • To debug a specific step call save_and_open_page within the step

Additional Documentation

Contributors