Skip to content
This repository has been archived by the owner on Nov 27, 2017. It is now read-only.

gongo/turnip-parallel_tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Helper ParallelTests for Turnip

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages