toptal / crystalball

Regression Test Selection library for your RSpec test suite
https://toptal.github.io/crystalball/
MIT License
323 stars 41 forks source link

Get prediction as a list in STDOUT #117

Open pirj opened 5 years ago

pirj commented 5 years ago

Crystalball needs to be able to list predicted examples without actually running them. It's useful for further load balancing with Knapsack\whatever.

Proposed interface: crystalball --dry-prediction which outputs a list of predicted examples one per line.

Related to #112

henrich-m commented 5 years ago

It would also make Cucumber Support a lot easier

Neal910 commented 4 years ago

Any update on this? or alternative ways? Thanks.

pirj commented 4 years ago

A pull request is welcome!

Neal910 commented 4 years ago

With my prototype PR above, I have been able to output the prediction lists. However per each path the format is something like this ./spec/models/**/create_line_items_spec.rb[1:1:1:1:2]. Is there a way to make the output using line number instead of this [1:1:1:2] structure? Because line number is accepted by most of the rspec framework.

pirj commented 4 years ago

Couldn't quickly find it in the docs, but RSpec understands [1:1:1:1:2] as well.

pluff commented 4 years ago

Spec address based on line number doesn't work well with shared examples or cycles, that's why 🔮 uses example id.