Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to shuffle test files. #21

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

floere
Copy link

@floere floere commented Jan 20, 2014

This is an idea that I'd like to put forth:
Add "shuffle" option. This adds a -u/--shuffle option (default is "do not shuffle", as it is currently).

Reason:
I really do like the new -a option. However, I do believe - ymmv - that tests should be run in random order to detect setup/code loading issues.

Currently, I do have to use something akin to FileList["spec/#{dir}/*_spec.rb"].shuffle.join ' ' to make this happen, which negates the benefits of -a.

Always shuffling, adding a shuffle option (e.g. -u), or always shuffling on -a would be my wish-order.

I'd like to put this idea up for discussion. Thanks for considering it :)

This adds a -u/--shuffle option (default is "do not shuffle", as it is currently).
@alloy
Copy link
Contributor

alloy commented Jan 20, 2014

👍

This is something that comes up most often across platforms where the default FS order might be different, e.g. local OS X remote (TravisCI) Linux.

One thing I’d like to see added is printing the full command that you can copy-paste to easily reproduce the results locally.

@floere
Copy link
Author

floere commented Jan 20, 2014

I completely forgot to add that at least in case of shuffling, the file order used should be printed (thanks @alloy for the reminder). But perhaps let's discuss this PR first.

@alloy
Copy link
Contributor

alloy commented Jan 20, 2014

I think it’s an essential part of this UX feature and important to take into consideration when thinking about the usefulness of it.

@floere
Copy link
Author

floere commented Jul 9, 2014

Travis is failing because this is 1.9.3+ code only.

@mmzoo
Copy link

mmzoo commented Apr 14, 2015

Is there a chance this can get merged in or does Bacon support Ruby 1.8?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants