Skip to content

Instantly share code, notes, and snippets.

@fotinakis
Last active May 17, 2017 17:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fotinakis/ec5a304286738f7e8f401289f2d6b1d0 to your computer and use it in GitHub Desktop.
Save fotinakis/ec5a304286738f7e8f401289f2d6b1d0 to your computer and use it in GitHub Desktop.
percy-capybara manual parallelization setup
# Tell Percy that this is a parallelized build. Because we separately finalize
# Percy builds, this should remain "2" no matter the actual number of nodes.
#
# Set this environment variable:
PERCY_PARALLEL_TOTAL=2
# In your spec_helper, only call `initialize_build` and not finalize:
config.before(:suite) { Percy::Capybara.initialize_build }
# Do not call `finalize_build`.
# ... run parallel tests and re-tries ...
# After all tests and re-tries have completed successfully, run:
Integer(ENV['PERCY_PARALLEL_TOTAL']).times do
Percy::Capybara.initialize_build
Percy::Capybara.finalize_build
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment