Giter Site home page Giter Site logo

zeus-parallel_tests's Introduction

Zeus::ParallelTests

Build Status Dependency Status

Zeus is a tool for speeding up your tests by preloading a Rails app. parallel_tests also speeds up your tests by running them, well, in parallel. Two good gems, so why not to use them together? Let's make our CPUs sweat!

Show me the numbers!

RSpec

$ time rspec spec

...

Finished in 1 minute 8.34 seconds
916 examples, 0 failures

real    1m21.480s
user    1m4.805s
sys     0m4.516s

parallel_tests

$ time rake parallel:spec[8]
Using recorded test runtime
8 processes for 141 specs, ~ 17 specs per process

...

916 examples, 0 failures

Took 46.626499 seconds

real    0m55.790s
user    4m3.065s
sys     0m32.160s

Zeus+parallel_tests

$ time zeus rake parallel:spec[8]
Developer helpers loaded
Using recorded test runtime
8 processes for 141 specs, ~ 17 specs per process

...

916 examples, 0 failures

Took 26.610327 seconds

real    0m28.514s
user    0m0.732s
sys     0m0.061s

Ready to go?

Installation

RailsCast episode #413 Fast Tests

Add this line to your application's Gemfile:

gem 'zeus-parallel_tests'

And then execute:

$ bundle

You need also to initialize your project with custom Zeus plan:

$ zeus-parallel_tests init

This will create two files in your project:

  • custom_plan.rb
  • zeus.json

RVM

For RVM users it is recommended to install rubygems-bundler gem.

Usage

First follow instructions and prepare your application to use parallel_tests.

Launch another terminal and run zeus' master process:

$ bundle exec zeus start

Then you can run your parallel specs:

$ zeus parallel_rspec spec

or your cucumbers:

$ zeus parallel_cucumber features

What is supported?

  • rspec
  • cucumber
  • guard-rspec since v2.5.2 (just pass zeus: true and parallel: true into configuration hash, you can play with bundler: false option to speed things up)

TODO

  • minitest support

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

zeus-parallel_tests's People

Contributors

matthew342 avatar patrickjs avatar pboling avatar sevos avatar

Watchers

 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.