• This repository has been archived on 29/Apr/2024
  • Stars
    star
    194
  • Rank 200,219 (Top 4 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 11 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Zeus::ParallelTests

No Maintenance Intended Circle CI Dependency Status Gem Version

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)
  • caching: you must set config.cache_store = :memory_store as Zeus will not reload the various cache files used by parallel_tests instances

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

More Repositories

1

methods

making referencing methods in Ruby easy
Ruby
33
star
2

kpi

Key Performance Indicators for Rails
Ruby
29
star
3

rubygems-localproxy

Ruby
6
star
4

timebacus_gemified

Experimnting with separating application business logic from Rails app
Ruby
3
star
5

polymorphic_model

Alternative for ActiveRecord's Single Table Inheritance
Ruby
3
star
6

rordevtoolkit

Rake-based toolkit for installing RoR-developer tools (like ViM with plugins, db server, testing environment). It supports custom recipes in DSL.
Ruby
2
star
7

jposnet

My bachelor thesis
Ruby
2
star
8

paperless-pi

Scan your incoming mail using Raspberry Pi and attached scanner sipported by SANE. (learning-Erlang-project)
JavaScript
2
star
9

dockerenv

Test approach to development environment
Shell
1
star
10

TimebacusCLI

Console timebacus.com client for Mac OS X
Objective-C
1
star
11

eax.pl

Company site
Ruby
1
star
12

logo-contest

Simple site where users could vote for logo of my company.
Ruby
1
star
13

vim-toolbox

Ruby
1
star
14

100pushups-things

100pushups project generator for Things for Mac written in AppleScript
1
star
15

dotfiles

Lua
1
star
16

shorty

A validator for too long data
Ruby
1
star
17

paypalabels

App for converting CSVs from Paypals into mail-labels. Private app. Use on your own risk!
Ruby
1
star
18

crm-phoenix-ember

Trying to connect Ember.js (Ember-CLI) and Phoenix in Pipedrive-like CRM
JavaScript
1
star
19

polymorphic_model_example

Example usage of polymorphic model
Ruby
1
star
20

dotfiles-old

Shell
1
star
21

rails_app_scaffold

Rails 2.3.8 application scaffold.
Ruby
1
star
22

habtm_counter_cache

Example of implementing counter_cache updates in has and belongs to many relation in ActiveRecord. It will probably evolve to a gem.
Ruby
1
star
23

multi_dokku

Prototype of dokku router (routing git pushes and HTTP)
Shell
1
star