0

My requirement is to run a single rspec file at the end of the suite after all the other rspecs are run. Since the spec - specA - is changed when other tests are run in parallel with it.

I have tried --single and --isolate

parallel_rspec -n 4 Spec/**/*.rb --isolate Spec/specA.rb

or

parallel_rspec -n 4 Spec/**/*.rb --single Spec/specA.rb

These seem to run in the same process specified. Or alternatively is there any way to call parallel_rspec twice without overwriting the previous exection ? Calling parallel_rspec twice seems to give only the second run's result at the end.

  • Could you share a link to `parallel_rspec` gem/lib? I can't find anything that have documented `--isolate` nor `--signle` options. – Greg Mar 24 '21 at 10:23
  • Oh, I found it (https://www.ruby-toolbox.com/projects/parallel_tests), did you try `parallel_rspec -n 4 Spec/**/*.rb --single Spec/specA.rb --isolate` ?? – Greg Mar 24 '21 at 10:26
  • Yes, --single makes this specA run in a seperate thread and isolate makes sure that no other specs are using this thread for execution. But there are still other specs running in parallel. For now , i am running them in sequence by calling parallel_rspec twice but attaching the existing run result to the previous result by not clearing the previous report. This is only a work-around. – Gowthaman Ravindran Mar 24 '21 at 10:48

0 Answers0