-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rakefile
54 lines (36 loc) · 1.13 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
require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:api, 'API tests') do |t|
t.profile = 'api'
end
Cucumber::Rake::Task.new(:selenium, 'Selenium tests') do |t|
t.profile = 'selenium'
end
Cucumber::Rake::Task.new(:touch, 'Touch tests') do |t|
t.profile = 'touch'
end
desc "iPhone tests"
task :iphone do
ENV['IPHONE_SYM_PATH'] = "iWebDriver.app"
Cucumber::Rake::Task.new(:iphone_runner) do |t|
t.profile = 'iphone'
end
Rake::Task[:iphone_runner].invoke
end
desc "Sauce tests"
task :sauce do
unless ENV['SAUCE_USERNAME'] and ENV['SAUCE_KEY']
puts "\n\nCan't run sauce tests without a sauce account"
puts "You can get a free account here: http://saucelabs.com/"
puts "Provide username and API Key: "
puts "export SAUCE_USERNAME=username"
puts "export SAUCE_KEY=api_key\n\n"
puts "Skipping Sauce...\n\n"
end
Cucumber::Rake::Task.new(:sauce_runner) do |t|
t.profile = 'sauce'
end
Rake::Task[:sauce_runner].invoke
end
desc "Run all tests"
task :all => [:api, :selenium, :touch, :iphone, :sauce]
task :default => :all