-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile.rb
More file actions
28 lines (24 loc) · 779 Bytes
/
Rakefile.rb
File metadata and controls
28 lines (24 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require 'rubygems'
require 'cucumber'
require 'cucumber/rake/task'
require 'parallel'
require 'json'
@browsers = JSON.load(open('browsers.json'))
@parallel_limit = ENV["nodes"] || 1
@parallel_limit = @parallel_limit.to_i
task :cucumber do
Parallel.each(@browsers, :in_processes => @parallel_limit) do |browser|
begin
puts "Running with: #{browser.inspect}"
ENV['SELENIUM_BROWSER'] = browser['browser']
ENV['SELENIUM_VERSION'] = browser['browser_version']
ENV['BS_AUTOMATE_OS'] = browser['os']
ENV['BS_AUTOMATE_OS_VERSION'] = browser['os_version']
Rake::Task[:run_features].execute()
rescue Exception => e
puts "Error while running task"
end
end
end
Cucumber::Rake::Task.new(:run_features)
task :default => [:cucumber]