Cucumber / Vatira Parallel Scenarios in * Windows *

Any thoughts on what I can do / use to run cucumber scripts in parallel on Windows? So far I have tried (with the following conclusions):

Watirgrid

You must use Ruby threads to actually run in parallel. This forces us to wrap the browser object in a stream, and therefore not reachable after closing the stream block. (Cannot transfer browser object to cucumber environment)

Hydra:

SSH (and public key) access to remote blocks is required (i.e. without Windows)

Selenium Mesh:

Super heavy and can't find a clear way to test cucumbers

TestJour:

Bonjour required (which is not available for Windows)

+3
source share
1

Re Watirgrid...

, watir . , . :

https://github.com/90kts/watirgrid/blob/master/examples/cucumber/step_definitions/example_steps.rb

:

Given /^navigate to the portal$/ do
  @grid.iterate {|browser| browser.goto "http://gridinit.com/examples/logon.html" }
end

When /^they enter their credentials$/ do
  @grid.iterate do |browser|
    browser.text_field(:name => "email").set "tim@mahenterprize.com"
    browser.text_field(:name => "password").set "mahsecretz"
    browser.button(:type => "submit").click
  end
end

Then /^they should see their account settings$/ do
  @grid.iterate do |browser|
    browser.text.should =~ /Maybe I should get a real Gridinit account/
  end
end

- , . watirgrid EC2, - http://gridinit.com/public/examples, !

FYI / watirgrid v1.1.2

, /env.rb, :

require 'watirgrid'
require 'rspec/expectations';

ENV["GRID"] = 'true'
ENV["controller_uri"] = "druby://10.0.1.3:11235"

if ENV["GRID"] then
  params = {}
  params[:controller_uri]   = ENV["controller_uri"]
  params[:browser]          = 'chrome' # type of webdriver browser to spawn
  grid ||= Watir::Grid.new(params)
  grid.start(:initiate => true, :quantity => 1, :take_all => true)
else
  @browser ||= Watir::Browser.new :chrome
end

Before do |scenario|
  @browser = grid.providers.first
end

at_exit do
  grid.iterate do |browser|
    browser.close
  end
  grid.release_tuples
end

. :take_all => true, at_exit... CLI, , bash DOS script

cucumber features --name "Name of scenario 1"
cucumber features --name "Name of scenario 2"
cucumber features --name "Name of scenario 3"
...
etc
+1

All Articles