renderedtext / test-boosters

Auto Parallelization - runs test files in multiple jobs
MIT License
54 stars 40 forks source link

Pass test file pattern via the TEST_FILE_PATTERN environment variable #58

Closed bmarkons closed 4 years ago

bmarkons commented 6 years ago

RSpec booster runs all specs which match spec/**/*_spec.rb path. Cucumber booster runs all features within features/**/*.feature path.

It would be useful if you could specify subdirectory from which you want your specs to be included.

Currently, this can be achieved by moving all unwanted test files before Booster is run.

shiroyasha commented 6 years ago

Sounds like a good proposal. What do you think about introducing an environment variable called TEST_FILE_PATTERN='spec/**/*.rb'.

bmarkons commented 6 years ago

Sounds like a good idea!

justinbburris commented 5 years ago

If there's no traction on this, do you mind if I try?

We have rspec 'feature' tests that live under feature/features/**/*.rb and I'd really like to split them.

bmarkons commented 5 years ago

If the user provides TEST_FILE_PATTERN variable to the booster command, we need to pass it here: https://github.com/renderedtext/test-boosters/blob/master/lib/test_boosters/boosters/rspec.rb#L8

Otherwise, the behaviour should stay the same.

@justinbburris: don't hesitate to propose PR, we can review it after 🙇