分布式 RSpec
RRRSpec enables you to run RSpec in a distributed manner.
This is developed for the purpose to obtain the fault-tolerance properties to process-failures, machine-failures, and unresponsiveness of processes in the automated testing process.
RRRSpec is used in production as a CI service, running 60+ RSpec processes
concurrently, and it undergoes those failures, which include lots of rb_bugs,
assertion errors, and segmentation faults.
As of Feb 2019, we, Cookpad, are not using RRRSpec internally. We may ocassionally review and accept PRs, but note that this software is not under active maintainance.
(Background: The circumstances has been changed since 2013. Modern IaaS providers such as AWS now provide machines with many vCPUs under cheap pricing. Also, Cookpad is working to split their largest Rails monolith application (blog post :jp:), and it makes the test suite small. Thus, we decided to stop operating RRRSpec cluster.)
Some considerations on creating RRRSpec are described in DESIGN.md, hoping it helps other developers writing other distributed test execution services avoid common pitfalls.
Add this line to your application's Gemfile:
gem 'rrrspec-client'Create '.rrrspec'
…Install 'rrrspec-server'
$ gem install rrrspec-serverCreate 'rrrspec-server-config.rb'
…$ rake -f /path/to/rrrspec-server-X.X.X/tasks/db.rake rrrspec:server:db:create rrrspec:server:db:migrate RRRSPEC_CONFIG_FILES=rrrspec-server-config.rb
$ rrrspec-server server --config=rrrspec-server-config.rb
$ rrrspec-server worker --config=rrrspec-server-config.rbNote: You must be able to rsync files from the host where the server runs to the host where the worker runs, without being prompted to for a passphrase.
$ bundle exec rrrspec-client start
...
rrrspec:taskset:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
$ bundle exec rrrspec-client waitfor rrrspec:taskset:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
$ bundle exec rrrspec-client show rrrspec:taskset:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXYou can try RRRSpec locally using Docker.
% docker-compose up
% docker-compose run worker local_test/run_client.sh
% xdg-open http://localhost:3000/See HACKING.md for the internal structure.
git checkout -b my-new-feature)git commit -am 'Add some feature')git push origin my-new-feature)暂无开放 Issues,或尚未同步最近议题。