0.01
No commit activity in last 3 years
No release in over 3 years
Predict which tests are likely to fail after you’ve changed the code
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0.9.0, ~> 0.9

Runtime

>= 0.21.0, ~> 0.21
>= 1.3.10, ~> 1.3
 Project Readme

What To Run

Join the chat at https://gitter.im/DyegoCosta/what_to_run

Build Status

What To Run is a lib for regression test selection for Ruby projects, use it to predict which tests you should run when you make any modification on your codebase.

This lib was inspired by @tenderlove blog post. Make sure to check it out.

From the An Empirical Study of Regression Test Selection Techniques article:

Regression testing is the process of validating modified software to detect whether new errors have been introduced into previously tested code and to provide confidence that modifications are correct. Since regression testing is an expensive process, researchers have proposed regression test selection techniques as a way to reduce some of this expense. These techniques attempt to reduce costs by selecting and running only a subset of the test cases in a program’s existing test suite.

Requirements

  • Project must be inside a Git repository
  • CMake to build the gem

Installation

Add this line to your application's Gemfile:

gem 'what_to_run'

And then execute

$ bundle

Or install it yourself as:

$ gem install what_to_run

Usage

Require it after requiring your test framework and before load your files to be tested and your test suite config:

Minitest

require 'what_to_run/minitest'

RSpec

require 'what_to_run/rspec'

Run your full tests suite with COLLECT=1 on a clean git branch

Minitest

$ COLLECT=1 bundle exec rake test

RSpec

$ COLLECT=1 bundle exec rspec

This will create the initial coverage information. Then make your desired modifications on your code.

Now to run the tests that could reveal faults do the following

$ what_to_run <framework> [options]

Supported frameworks are:

rspec
minitest

Options are:

-e, --exec EXECUTABLE            Alternate test runner executable
-h, --help                       Prints this help

Contributing

Open an issue or fork it and submit a pull-request.

License

What To Run is released under the MIT License.