Skip to content

Regression Test Selection library for your Ruby test suite

License

Notifications You must be signed in to change notification settings

mpapis/crystalball

 
 

Repository files navigation

Crystalball

Crystalball is a Ruby library which implements Regression Test Selection mechanism originally published by Aaron Patterson. Its main purpose is to select a subset of your test suite which should be run to ensure your changes didn't break anything.

Installation

Add this line to your application's Gemfile:

group :test do
  gem 'crystalball'
end

And then execute:

$ bundle

Or install it yourself as:

$ gem install crystalball

Usage

  1. Add Crystalball::MapGenerator.start! to your spec_helper before you loaded any file of your app.
  2. Run your test suite on clean branch with green build. This step will create file execution_map.yml in your project root
  3. Make some changes to your app code
  4. Call Crystalball.foresee to see list of tests which might fail because of your changes.

Under the hood

TODO: Write good description for anyone who wants to customize behavior

Plans

  1. 100% spec coverage
  2. Different strategies for source diff
  3. Different strategies for failure predictor
  4. Different strategies for execution map
  5. Guard replacement
  6. integration for git hook

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/pluff/crystalball. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

About

Regression Test Selection library for your Ruby test suite

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 98.4%
  • Shell 1.6%