thoughtbot/capybara-webkit — Issue #200: Can't run integration tests in parallel with capybara-webkit
Author: mocoso
Created: 2011-10-28 11:05:16+00:00
State: open

We are running our integration tests with capybara-webkit under Jenkins CI.

We're running on Ubuntu (11.04), Ruby Enterprise Edition (2011.03) and the following gem versions - capybara-webkit ref: 93bfcf6e4642b14a1f401706f14bf672568fa7f0 (which was the HEAD version on Oct 14th 2011), headless v0.2.2, capybara v1.1.1

All our integration tests work correctly if we only have one set of integration tests being run on our CI server.

But if we are running integration tests for more than one version of our codebase at the same time then capybara-webkit appears to have problems (these parellel builds worked fine before we switched to using capybara-webkit).

A typical output when running tests in parallel with the :webkit_debug driver would be

>> 1
<< ok
<< 0
<<
And I follow "Manage my Agenda" # features/step_definitions/web_steps.rb:33
>> Find
>> 1
>> 54
>> .//*[@id = 'agenda-home']//*[@id = 'reserved-counter']
webkit_server: Fatal IO error: client killed
<<
Then I should see /Sessions reserved/ within "#agenda-home #reserved-counter" # features/step_definitions/web_steps.rb:117
No response received from the server. (Capybara::Driver::Webkit::WebkitNoResponseError)
(eval):2:in `send'
(eval):2:in `find'
./features/step_definitions/web_steps.rb:14:in `with_scope'
./features/step_definitions/web_steps.rb:119:in `/^(?:|I )should see \/([^\/]*)\/(?: within "([^"]*)")?$/'
features/jump/manage_booking.feature:35:in `Then I should see /Sessions reserved/ within "#agenda-home #reserved-counter"'
And I should see "You have not booked into any sessions yet" # features/step_definitions/web_steps.rb:107
When I click "Reserve now" for the "Optimise Session 1" session in the "Optimise" track # features/step_definitions/jump/jump_steps.rb:140
Then I should see a jump session booking for the "Optimise Session 1" session in the "Optimise" track # features/step_definitions/jump/jump_steps.rb:115
When I click "Cancel reservation" for the "Optimise Session 1" session in the "Optimise" track # features/step_definitions/jump/jump_steps.rb:140
Then I should not see a jump session booking for the "Optimise Session 1" session in the "Optimise" track # features/step_definitions/jump/jump_steps.rb:115
And I should see "You have not booked into any sessions yet" # features/step_definitions/web_steps.rb:107
>> Reset
Broken pipe (Errno::EPIPE)
/var/lib/jenkins/jobs/ds-joel/workspace/vendor/bundle/ruby/1.8/bundler/gems/capybara-webkit-93bfcf6e4642/lib/capybara/driver/webkit/socket_debugger.rb:20:in `write'

Or...

Then I should not see a jump session booking for the "Optimise Session 1" session in the "Optimise" track # features/step_definitions/jump/jump_steps.rb:115
And I should see "You have not booked into any sessions yet" # features/step_definitions/web_steps.rb:107
webkit_server: cannot connect to X server :99
timed out (Capybara::TimeoutError)
/var/lib/jenkins/jobs/ds-joel/workspace@3/vendor/bundle/ruby/1.8/gems/capybara-1.1.1/lib/capybara/util/timeout.rb:17:in `timeout'
/var/lib/jenkins/jobs/ds-joel/workspace@3/vendor/bundle/ruby/1.8/bundler/gems/capybara-webkit-93bfcf6e4642/lib/capybara/driver/webkit/browser.rb:176:in `connect'