-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
executable file
·183 lines (129 loc) · 4.98 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
require 'rubygems'
require 'cucumber'
require 'cucumber/rake/task'
require 'rake'
require 'rspec/core/rake_task'
require 'simplecov'
require 'yard'
require 'testcentricity_apps/version'
desc 'Run WIP specs'
RSpec::Core::RakeTask.new(:wip_specs) do |t|
t.rspec_opts = '--tag wip'
end
desc 'Run required specs'
RSpec::Core::RakeTask.new(:required_specs) do |t|
t.rspec_opts = '--tag required'
end
desc 'Run BrowserStack specs'
RSpec::Core::RakeTask.new(:browserstack_specs) do |t|
t.rspec_opts = '--tag browserstack'
end
desc 'Run TestingBot specs'
RSpec::Core::RakeTask.new(:testingbot_specs) do |t|
t.rspec_opts = '--tag testingbot'
end
desc 'Run Custom User-defined Cloud Driver specs'
RSpec::Core::RakeTask.new(:custom_driver_specs) do |t|
t.rspec_opts = '--tag custom'
end
desc 'Run RN Demo Cucumber smoke test features on iOS simulator using environment variables and JSON data source'
Cucumber::Rake::Task.new(:rn_bat_ios) do |t|
t.profile = 'rn_bat_ios'
end
desc 'Run RN Demo Cucumber regression test features on iOS simulator using W3C capabilities and YAML data source'
Cucumber::Rake::Task.new(:rn_regress_ios) do |t|
t.profile = 'rn_regress_ios'
end
desc 'Run RN Demo Cucumber smoke test features on Android simulator using environment variables and JSON data source'
Cucumber::Rake::Task.new(:rn_bat_android) do |t|
t.profile = 'rn_bat_android'
end
desc 'Run RN Demo Cucumber regression test features on Android simulator using W3C capabilities and YAML data source'
Cucumber::Rake::Task.new(:rn_regress_android) do |t|
t.profile = 'rn_regress_android'
end
desc 'Run RN Demo Cucumber deeplink test features on Android physical device hosted on BrowserStack'
Cucumber::Rake::Task.new(:deeplink_bs_android) do |t|
t.profile = 'rn_deeplink_bs_android'
end
desc 'Run RN Demo Cucumber deeplink test features on iOS 17 physical device hosted on BrowserStack'
Cucumber::Rake::Task.new(:deeplink_bs_ios17) do |t|
t.profile = 'rn_deeplink_bs_ios17'
end
desc 'Run RN Demo Cucumber deeplink test features on OS 16 physical device hosted on BrowserStack'
Cucumber::Rake::Task.new(:deeplink_bs_ios16) do |t|
t.profile = 'rn_deeplink_bs_ios16'
end
desc 'Run WDIO Demo Cucumber smoke test features on iOS simulator using environment variables and JSON data source'
Cucumber::Rake::Task.new(:wdio_bat_ios) do |t|
t.profile = 'wdio_bat_ios'
end
desc 'Run WDIO Demo Cucumber smoke test features on Android simulator using environment variables and JSON data source'
Cucumber::Rake::Task.new(:wdio_bat_android) do |t|
t.profile = 'wdio_bat_android'
end
desc 'Run WDIO Demo Cucumber regression test features on iOS simulator using W3C capabilities and YAML data source'
Cucumber::Rake::Task.new(:wdio_regress_ios) do |t|
t.profile = 'wdio_regress_ios'
end
desc 'Run WDIO Demo Cucumber regression test features on Android simulator using W3C capabilities and YAML data source'
Cucumber::Rake::Task.new(:wdio_regress_android) do |t|
t.profile = 'wdio_regress_android'
end
desc 'Run MacOS Calculator Cucumber regression test features using W3C capabilities and YAML data source'
Cucumber::Rake::Task.new(:calc_regress) do |t|
t.profile = 'calc_regress'
end
desc 'Run cloud service specs'
task cloud_specs: [:browserstack_specs,
:custom_driver_specs,
:testingbot_specs]
desc 'Run required specs and Cucumber features'
task required: [:required_specs,
:wdio_bat_android,
:wdio_bat_ios,
:rn_bat_android,
:rn_bat_ios]
desc 'Run all specs'
task all_specs: [:required_specs,
:browserstack_specs,
:custom_driver_specs,
:testingbot_specs]
desc 'Run Cucumber smoke test features'
task smoke: [:wdio_bat_android,
:wdio_bat_ios,
:rn_bat_android,
:rn_bat_ios]
desc 'Run Cucumber regression test features'
task regress: [:wdio_regress_android,
:wdio_regress_ios,
:rn_regress_android,
:rn_regress_ios,
:calc_regress]
desc 'Run Cucumber deeplink test features on BrowserStack hosted real devices'
task device_deeplink: [:deeplink_bs_android,
:deeplink_bs_ios17]
desc 'Run all specs and Cucumber features'
task all: [:required_specs,
:browserstack_specs,
:custom_driver_specs,
:wdio_bat_ios,
:rn_bat_android,
:device_deeplink,
:regress]
desc 'Update HTML docs'
YARD::Rake::YardocTask.new(:docs) do |t|
ENV['COVERAGE'] = 'false'
t.files = ['lib/**/*.rb']
end
desc 'Build and release new version of gem'
task :release do
ENV['COVERAGE'] = 'false'
version = TestCentricityApps::VERSION
puts "Releasing version #{version} of TestCentricity Apps gem, y/n?"
exit(1) unless $stdin.gets.chomp == 'y'
sh 'gem build testcentricity_apps.gemspec && ' \
"gem push testcentricity_apps-#{version}.gem"
end
desc 'Update docs, build gem, and push to RubyGems'
task ship_it: [:docs, :release]