3
votes

I have a test suite which is using capybara & rspec using Ruby. I am using the parallel_tests gem in order to run my tests in parallel using sauce.

Now this is great, but it splits up the workload into spec files rather than what I want which is using the capybara features or even better, the scenarios. My spec file looks like

publisher_spec.rb

feature "Adding users to the publisher" Scenario "using public groups" Scenario "using private groups"

So I want to run each scenario as a parallel test, but it only looks at the spec files, forcing me to break up by spec file into multiple units. My test suite would run faster if I had 1 scenario / spec file, but that would ruin the readibility and ability to use "before" steps.

Anyone have a good solution?

1

1 Answers

1
votes

Depends on how many parallel processes there are and how many files (and how long they take).

parallel_tests implements an "evening out" strategy by logging how long each spec file takes to run, as explained in their readme. If the files you have can not be evened out, splitting them apart is your only option.

There's also the new parallel gem paraspec. It looks promising, but I have not yet tried it out with feature testing.