Project

miss_cleo

0.0
No commit activity in last 3 years
No release in over 3 years
Miss Cleo frees you from having to run your full test suite to be confident in your recent code changes. Call me now!
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.9.12
~> 10.5.0
>= 0

Runtime

~> 1.0
~> 0.23.3
 Project Readme

MissCleo

Miss Cleo

Miss Cleo is a test failure predictor based on Tenderlove's idea. The idea is to give you a reasonable amount of confidence that your code changes are ok without having to run your full CI build.

Requirements

Miss Cleo depends on Ruby 2.3.x (currently trunk Ruby) for its Coverage.peek_result functionality.

Installation

Add this line to your application's Gemfile:

gem 'miss_cleo'

And then execute:

$ bundle

Or install it yourself as:

$ gem install miss_cleo

Setup

Right now Miss Cleo only supports Cucumber and RSpec tests. To use Miss Cleo:

Cucumber

Before you can use Miss Cleo with your Cucumber tests, add the following line to your support/env.rb file:

MissCleo::TestConfigurations::CucumberConfig.setup_hooks(self)

Rspec

Before you can use Miss Cleo with your RSpec tests, add the following line to your spec/spec_helper.rb file:

MissCleo::TestConfigurations::RspecConfig.setup_hooks(self)

How to get predictin'

To use Miss Cleo, you'll need to first build a coverage diff of your green build. Do this by running your tests with the COVERAGE environment variable set to true.

Examples:

  • COVERAGE=true cucumber features/user.feature
  • COVERAGE=true rspec spec/user_spec.rb

With your coverage diffs built, you'll need to generate a coverage map, which we're calling a deck. To build your deck, run: miss_cleo build_deck <list of coverage diff files>

Usage

After you've made some code changes, run miss_cleo predict to be shown the relevant tests to run.

Note: Miss Cleo only tries to predict tests failures for uncommitted changes. Make sure your build is green before committing code!

Known Oversights

Like the real Miss Cleo, we can't predict everything. Things we can't predict include:

  • Rails views
  • ActiveRecord methods
  • ActiveRecord concerns
  • Anything that generally runs only through gem code
  • Any external library code

Contributing

  1. Fork it ( https://github.com/[my-github-username]/miss_cleo/fork )
  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 a new Pull Request