-
Notifications
You must be signed in to change notification settings - Fork 28
/
Rakefile
47 lines (40 loc) · 1.42 KB
/
Rakefile
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
def run_tests(platform, browser, version, junit_dir)
system("platform=\"#{platform}\" browserName=\"#{browser}\" version=\"#{version}\" JUNIT_DIR=\"#{junit_dir}\" parallel_cucumber features -n 20")
end
# Windows 10 and supported Edge xx version
task :windows_10_edge do
run_tests('Windows 10', 'microsoftedge', '20.10240', 'junit_reports/windows_10_edge')
end
# Windows 8.1 and supported Chrome xx version
task :windows_8_1_chrome do
run_tests('Windows 8.1', 'chrome', '48', 'junit_reports/windows_8_1_chrome')
end
# Windows 7 and supported Firefox xx version
task :windows_7_firefox do
run_tests('Windows 7', 'firefox', '44', 'junit_reports/windows_7_firefox')
end
# OS X 10.x and supported Chrome xx version
task :os_x_10_10_chrome do
run_tests('OS X 10.10', 'chrome', '48', 'junit_reports/os_x_chrome')
end
# OS X 10.x and supported Safari x version
task :os_x_10_10_safari do
run_tests('OS X 10.10', 'safari', '8', 'junit_reports/os_x_safari')
end
task :travis do
["rake os_x_10_10_chrome", "rake windows_7_firefox"].each do |cmd|
puts "Starting to run #{cmd}..."
system("export DISPLAY=:99.0 && bundle exec #{cmd}")
raise "#{cmd} failed!" unless $?.exitstatus == 0
end
end
# Task to run all the above configurations in parallel
multitask :test_sauce => [
# :windows_10_edge,
:windows_8_1_chrome,
:windows_7_firefox,
:os_x_10_10_chrome,
:os_x_10_10_safari
] do
puts 'Running automation'
end