Coder Social home page Coder Social logo

salad's Introduction

Run your Cucumber on multiple CPUs.

Setup

Simply copy the rake task to lib/tasks in your Rails project.

Usage

RAILS_ENV=test rake salad:features

At the moment you explicitly need to set RAILS_ENV to test. The first time you run it, it will create and migrate the necessary database tables, so make sure your user for the test environment has privileges to create additional databases. Additional databases for the extra Cucumber processes are created by appending _#{i} to the test database as defined in your config.yml. This means it will not interfere with your regular test database. You can run this task and your specs at the same time.

Ctrl-c aborts all running processes.

Configuration

You can configure the arguments passed to Cucumber by editing the rake task. The number of Cucumber processes is determined by the SALAD_INSTANCES environment variable which, if not explicitly set, defaults to 4.

It is assumed your features live under RAILS_ROOT/features, if this is not the case you can change the features_dir variable in the script.

When in doubt, read the script. ;-)

Known problems

  • Sometimes tests will fail, for no apparent reason at all. :(
  • The first time you run it, it will create a bunch of databases, migrate them and then fail all features spectacularly... Simply quit it after migration is complete and try again.

Authors

Written by Sjoerd Tieleman (@tieleman) and Bart Zonneveld (@bartzon), to scratch their own itch. Patches much appreciated.

See also

Something you might also like (but wasn't around when we wrote this): Parallel specs. Takes a slightly different approach.

salad's People

Stargazers

Matthew Wheeler avatar

Watchers

James Cloos avatar Matthew Wheeler 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.