Rspec::Big::Split
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file lib/rspec/big/split
. To experiment with that code, run bin/console
for an interactive prompt.
TODO: Delete this and the text above, and describe your gem
Installation
Execute this command to add gem to your application's Gemfile:
bundle add rspec-big-split
Usage
- Add
ci_split_example_groups: true
as metadata to your example groups (only for big files). - Generate tests map with:
bundle exec rspec --dry-run --format Rspec::Big::Split::Formatter --out tmp/rspec_splitter.json
- Define variables like
TEST_NODE_TOTAL=20
andTEST_NODE_INDEX=0
in your CI/CD configuration.- Make sure that your indexing starts with
1
and ends equal toTEST_NODE_TOTAL
.
- Make sure that your indexing starts with
- (optional) Printout tests that will be run in current node:
bundle exec rspec-big-split tmp/rspec_splitter.json
- Run tests with
bundle exec rspec $(bundle exec rspec-big-split tmp/rspec_splitter.json)
to run tests on each node.