cuprite
cuprite copied to clipboard
Parallel specs
Here is my capyabra integration with parallel specs: it should work out of the box, maybe it's useful for others
test_env_number = ENV["TEST_ENV_NUMBER"].to_i
Capybara.server_port = 9887 + test_env_number
Capybara.register_driver :cuprite do |app|
Capybara::Cuprite::Driver.new(
app,
browser_options: {
'no-sandbox': nil,
'disable-gpu': nil,
'disable-dev-shm-usage': nil,
'disable-infobars': nil,
'disable-extensions': nil,
'disable-popup-blocking': nil,
'window-size': '1280,1024'
},
port: 9515 + test_env_number
)
end
Capybara.default_driver = :cuprite
I guess if you shortly explain your setup we can add it to README, issues are for bugs :)
Sure, this can be used, with or w/o parallel_specs. I'm using it with docker.
browser_options contains flags from a previous integration with chromedriver-helper.
Then you need to increment the ports of Capybara.server_port(rails process) and the browser. port: 9515 + test_env_number that's pretty much it.
I've made a similar issue some time ago to help others in need https://github.com/grosser/parallel_tests/issues/658