Repository is archived
No commit activity in last 3 years
No release in over 3 years
Helper ParallelTests for Turnip
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0

Runtime

 Project Readme

Turnip::ParallelTests

Helper parallel_tests for turnip.

Build Status Coverage Status

Motivation

I wanted to run a turnip project using parallel_rspec. However, parallel_rspec didn't find .feature files. (if specify option --pattern .feature, they are ignored when no one is spec/**/*_spec.rb)

So, I made this gem that will run if there is _spec.rb or .feature file to specified directories.

Installation

Add this line to your application's Gemfile:

gem 'turnip-parallel_tests'

And then execute:

$ bundle

Or install it yourself as:

$ gem install turnip-parallel_tests

Usage

Add --type turnip (or -t turnip) to the commands:

$ parallel_rspec -n 3 --type turnip spec

About grouping of tests.

Group tests by:

  • .feature: number of steps.
  • _spec.rb: file size.

eg:

$ ls spec
features/battle1.feature # 12 steps.
features/battle2.feature #  8 steps.
features/battle3.feature #  4 steps.
features/battle4.feature #  6 steps.

When 3 cpus:

$ parallel_rspec -n 3 --type turnip spec
  • thread1: battle1.feature
  • thread2: battle2.feature
  • thread3: battle3.feature , battle4.feature

License

see LICENSE.txt