Can Guard be used in conjunction with parallel tests?

I considered ways to speed up my testing using some kind of parallel tests in combination with my current Guard setup. Guard-Hydra seemed like a good start, but the Hydra gem itself is no longer supported, and the author directs people to parallel_tests .

Parallel tests seem very good. I got it at the command line using the usual rake task, but I can’t write the appropriate protective extension. I was rather surprised at the lack of information available when searching for "guard parallel_tests". Of course, I'm not the only Rails developer with a multi-core PC who would be interested in speeding up tests?

+8
ruby-on-rails rspec cucumber guard
source share
4 answers

I implemented this option on guard-rspec

https://github.com/guard/guard-rspec/pull/150

+8
source share

Now in ReadMe guard-rspec some information has appeared on how to do it here https://github.com/guard/guard-rspec (look down). At the time of writing, it looks like this (note the comma in the additional arguments)

rspec_options = { cmd: "bundle exec rspec", run_all: { cmd: "bundle exec parallel_rspec -o '", cmd_additional_args: "'" } } guard :rspec, rspec_options do # (...) 
+3
source share

Actually, I recently studied this and did not find a solution. This seems rather strange, because really smart people sit waiting for tests when unused kernels sit idle.

Anyone who can come up with a solution will make a huge contribution to the Rails and Ruby community.

+1
source share

I also implemented this option on guard-rspec:

https://github.com/guard/guard-rspec/pull/325

Also worked with multi-level communication:

http://pr0d1r2.tumblr.com/post/121591540433/parallel-tests-with-multitenancy-on-guard

0
source share

All Articles