forked from abta/qa-browsertests
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRakefile
executable file
·61 lines (49 loc) · 1.56 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
desc 'Run serial task.'
task default: :serial
# cucumber needs this
require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:serial, 'Run all Cucumber features in serial.') do |t|
t.profile = 'ci'
end
def processes
FileList['./features/*.feature'].size
end
desc 'Run all Cucumber features in parallel.'
task :parallel do
`parallel_cucumber features/ -n #{processes} --test-options '--profile ci'`
end
def run_tests(browser)
`parallel_cucumber features/ -n #{processes} --test-options '--profile #{browser}'`
end
desc 'Run all Cucumber features in parallel, do not run tests that fail in Chrome.'
task :chrome do |t|
run_tests(t.name)
end
desc 'Run all Cucumber features in parallel, do not run tests that fail in Firefox.'
task :firefox do |t|
run_tests(t.name)
end
desc 'Run all Cucumber features in parallel, do not run tests that have known bugs in IE6.'
task :ie6 do |t|
run_tests(t.name)
end
desc 'Run all Cucumber features in parallel, do not run tests that have known bugs in IE7.'
task :ie7 do |t|
run_tests(t.name)
end
desc 'Run all Cucumber features in parallel, do not run tests that have known bugs in IE8.'
task :ie8 do |t|
run_tests(t.name)
end
desc 'Run all Cucumber features in parallel, do not run tests that have known bugs in IE9.'
task :ie9 do |t|
run_tests(t.name)
end
desc 'Run all Cucumber features in parallel, do not run tests that have known bugs in IE10.'
task :ie10 do |t|
run_tests(t.name)
end
desc 'Run all Cucumber features in parallel, do not run tests that have known bugs in PhantomJS.'
task :phantomjs do |t|
run_tests(t.name)
end