forked from critick/teststack
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Rakefile
executable file
·89 lines (73 loc) · 2.21 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
require 'rubygems'
require 'cucumber'
require 'cucumber/rake/task'
require 'parallel'
require 'json'
require 'yard'
require 'fileutils'
Cucumber::Rake::Task.new(:api) do |t|
t.cucumber_opts = " -x APP=api
SERVER=http://139.59.94.120:5000/
features -p api "
end
Cucumber::Rake::Task.new(:web) do |t|
t.cucumber_opts = " DRIVER=poltergeist
APP=web
DEBUG=false
SERVER=http://139.59.94.120:5000/
features -p web "
end
Cucumber::Rake::Task.new(:webapp) do |t|
t.cucumber_opts = " DRIVER=firefox
APP=web
DEBUG=false
SERVER=http://139.59.94.120:5000/
features -p web "
end
Cucumber::Rake::Task.new(:webapps) do |t|
t.cucumber_opts = " DRIVER=selenium
APP=web
DEBUG=false
SERVER=http://139.59.94.120:5000/
features -p web "
end
Cucumber::Rake::Task.new(:android) do |t|
t.cucumber_opts = " DRIVER=appium
APP=native
OS=android
SERVER=http://139.59.94.120:5000
features -p android "
end
Cucumber::Rake::Task.new(:cloud) do |t|
t.cucumber_opts = " DRIVER=appium
APP=native
OS=android
SERVER=http://google.com
features -p cloud "
end
#Run rake docker["web"] for web
task :docker, :task do |t, args|
TASK = args[:task] ||"api"
puts 'bringing containers up ....'
sh "sh ./scripts/docker/docker.sh #{TASK}"
end
ADB_SERIAL = "" #device name
#This Task will start appium and execute posapp tests
task :app do
sh './scripts/run_appium.sh'
Rake::Task["android"].execute
end
task :stop_appium do
end
task :task do
puts "hello"
end
task :androidapp ,[:appname,:variant,:tag] do |t, args|
sh "./scripts/run_appium.sh"
sh "./scripts/fetch_builds.sh #{args[:appname]} #{args[:variant]}"
Rake::Task["app"].execute
end
YARD::Rake::YardocTask.new(:yard) do |t|
#t.files = ['features/**/*.feature', 'features/**/*.rb']
end
#task :default => [:web]