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.

3
  • Could you share a link to parallel_rspec gem/lib? I can't find anything that have documented --isolate nor --signle options. Commented Mar 24, 2021 at 10:23
  • Oh, I found it (ruby-toolbox.com/projects/parallel_tests), did you try parallel_rspec -n 4 Spec/**/*.rb --single Spec/specA.rb --isolate ?? Commented Mar 24, 2021 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. Commented Mar 24, 2021 at 10:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.