Note that there are some explanatory texts on larger screens.

plurals
  1. PORunning parallel selenium tests with capybara
    primarykey
    data
    text
    <p><strong>Background:</strong> </p> <p>I have a set of <strong>Capybara</strong> integration tests running against my Rails 3 Application. For the other parts of the test suite I'm using <strong>Rspec</strong>.</p> <p>I have a selenium 2.6.0 standalone server hub on my Mac OSX dev machine.</p> <pre><code>java -jar selenium-server-standalone-2.6.0.jar -role hub </code></pre> <p>I'm running several virtual machines each hooked up to the hub with a selenium node:</p> <pre><code>java -jar selenium-server-standalone-2.6.0.jar -role webdriver -hub http://0.0.1.12:4444/grid/register port 5555 -browser browserName="internet explorer",version=8,platform=WINDOWS </code></pre> <p>This works fine, In this screenshot the console shows that I have an IE7 and an IE8 browser connected to the hub:</p> <p><img src="https://i.stack.imgur.com/SnwdL.png" alt="The hub console showing connected nodes"></p> <p>I've setup capybara to run against the selenium hub (that delegates the tests to the nodes). </p> <pre><code>Capybara.app_host = "myapp.dev" Capybara.default_driver = :selenium Capybara.register_driver :selenium do |app| Capybara::Selenium::Driver.new(app, :browser =&gt; :remote, :url =&gt; "http://localhost:4444/wd/hub", :desired_capabilities =&gt; :internet_explorer) end </code></pre> <p>It works, however it will only run the test on a single internet_explorer node. It seems to be the one that is "first in line"; If i turn it off, the test will successfully run on the other node. </p> <p>I've been trying out the <a href="https://github.com/grosser/parallel_tests" rel="nofollow noreferrer">parallel_tests</a> project, configuring capybara as suggested, but that would still only launch one integration test.</p> <p><strong>How can I run my integration on all internet_explorer nodes simultaneously?</strong></p> <p><strong>Bonus question:</strong> If i wanted to run my integration tests on all connected nodes, regardless of browser capability, how would i do that?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload