fastlane-plugin-test_center 3.8.0.parallelizing.beta.2 → 3.8.0.parallelizing.beta.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/lib/fastlane/plugin/test_center/actions/multi_scan.rb +40 -23
- data/lib/fastlane/plugin/test_center/helper/multi_scan_manager/runner.rb +2 -2
- data/lib/fastlane/plugin/test_center/helper/test_collector.rb +3 -1
- data/lib/fastlane/plugin/test_center/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13ad7e271c23c0d85c4c1afa01f3e501d14b7b9a
|
4
|
+
data.tar.gz: d82d02aadd52a0222c01943597995878f66f65a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50b4a4721bdfe01fa4b117c55d297666fe6b2b1d1e8fe5c7ea1c21b18ca99442d11d20aef1ce80480c20f80eda6b177b0b9ea0e1fc325644638bba0ab8a1a532
|
7
|
+
data.tar.gz: 635cf64125c954ac153940fb5b335ec4f357e12dc3392e2452b221c33d9cbe3e9f3d3f0efbe8742509ba067dce5f9f14eec44c920eee10baa8c19446bf6d5712
|
data/README.md
CHANGED
@@ -97,6 +97,10 @@ Rather than wasting time trying to account for unstable tools, or trying to twea
|
|
97
97
|
|
98
98
|
Another issue that can cause tests to incorrectly fail comes from an issue with the iOS Simulator. If you provide a huge number of tests to the iOS Simulator, it can exhaust the available resources and cause it to fail large numbers of tests. You can get around this by running your tests in batches using the `:batch_count` option in order to lighten the load on the simulator.
|
99
99
|
|
100
|
+
#### Reduce Test Run Time
|
101
|
+
|
102
|
+
Make better use of your Mac resources by running batches of test runs in parallel iOS Simulators running simultaneously. Use the `:parallel_testrun_count` option to specify 2 to 6 simulators, each running a subset of your tests. It is not recommended to run more than 6 simulators in parallel as the service that backs the simulators can fail to connect to them.
|
103
|
+
|
100
104
|
#### Inspect Partial Results
|
101
105
|
|
102
106
|
If you have a large number of tests, and you want to inspect the overall status of how test runs are progressing, you can use the `:testrun_completed_block` callback to bailout early or make adjustments on how your tests are exercised.
|
@@ -18,6 +18,8 @@ module Fastlane
|
|
18
18
|
)
|
19
19
|
end
|
20
20
|
# :nocov:
|
21
|
+
params[:quit_simulators] ||= params._values[:force_quit_simulator]
|
22
|
+
|
21
23
|
force_quit_simulator_processes if params[:quit_simulators]
|
22
24
|
|
23
25
|
prepare_for_testing(params.values)
|
@@ -110,31 +112,46 @@ module Fastlane
|
|
110
112
|
end
|
111
113
|
|
112
114
|
def self.build_for_testing(scan_options)
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
115
|
+
values = prepare_scan_options_for_build_for_testing(scan_options)
|
116
|
+
# :nocov:
|
117
|
+
unless Helper.test?
|
118
|
+
FastlaneCore::PrintTable.print_values(
|
119
|
+
config: values,
|
120
|
+
hide_keys: [:destination, :slack_url],
|
121
|
+
title: "Summary for scan #{Fastlane::VERSION}"
|
119
122
|
)
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
# :nocov:
|
124
|
-
unless Helper.test?
|
125
|
-
FastlaneCore::PrintTable.print_values(
|
126
|
-
config: values,
|
127
|
-
hide_keys: [:destination, :slack_url],
|
128
|
-
title: "Summary for scan #{Fastlane::VERSION}"
|
129
|
-
)
|
130
|
-
end
|
131
|
-
# :nocov:
|
123
|
+
end
|
124
|
+
# :nocov:
|
132
125
|
|
133
|
-
|
134
|
-
|
126
|
+
remove_preexisting_xctestrun_files
|
127
|
+
Scan::Runner.new.run
|
128
|
+
update_xctestrun_after_build(scan_options)
|
129
|
+
remove_build_report_files
|
130
|
+
|
131
|
+
Scan.config._values.delete(:build_for_testing)
|
132
|
+
scan_options[:derived_data_path] = Scan.config[:derived_data_path]
|
133
|
+
end
|
134
|
+
|
135
|
+
def self.prepare_scan_options_for_build_for_testing(scan_options)
|
136
|
+
valid_scan_keys = Fastlane::Actions::ScanAction.available_options.map(&:key)
|
137
|
+
scan_options = scan_options.select { |k,v| %i[project workspace scheme device devices].include?(k) }
|
138
|
+
|
139
|
+
Scan.config = FastlaneCore::Configuration.create(
|
140
|
+
Fastlane::Actions::ScanAction.available_options,
|
141
|
+
scan_options.merge(build_for_testing: true)
|
142
|
+
)
|
143
|
+
values = Scan.config.values(ask: false)
|
144
|
+
values[:xcode_path] = File.expand_path("../..", FastlaneCore::Helper.xcode_path)
|
145
|
+
values
|
146
|
+
end
|
147
|
+
|
148
|
+
def self.update_xctestrun_after_build(scan_options)
|
149
|
+
scan_options[:xctestrun] = Dir.glob("#{Scan.config[:derived_data_path]}/Build/Products/*.xctestrun").first
|
150
|
+
end
|
135
151
|
|
136
|
-
|
137
|
-
|
152
|
+
def self.remove_preexisting_xctestrun_files
|
153
|
+
xctestrun_files = Dir.glob("#{Scan.config[:derived_data_path]}/Build/Products/*.xctestrun")
|
154
|
+
FileUtils.rm_rf(xctestrun_files)
|
138
155
|
end
|
139
156
|
|
140
157
|
def self.remove_build_report_files
|
@@ -182,7 +199,7 @@ module Fastlane
|
|
182
199
|
end
|
183
200
|
|
184
201
|
def self.scan_options
|
185
|
-
ScanAction.available_options.reject { |config| %i[output_types
|
202
|
+
ScanAction.available_options.reject { |config| %i[output_types].include?(config.key) }
|
186
203
|
end
|
187
204
|
|
188
205
|
def self.available_options
|
@@ -36,12 +36,12 @@ module TestCenter
|
|
36
36
|
@options[:only_testing] = @options[:only_testing]&.map(&:strip_testcase)&.uniq
|
37
37
|
@options[:skip_testing] = @options[:skip_testing]&.map(&:strip_testcase)&.uniq
|
38
38
|
|
39
|
-
RetryingScan.run(@options.reject { |key| %i[device devices].include?(key) } )
|
39
|
+
RetryingScan.run(@options.reject { |key| %i[device devices force_quit_simulator].include?(key) } )
|
40
40
|
end
|
41
41
|
|
42
42
|
def run_test_batches
|
43
43
|
test_batch_results = []
|
44
|
-
pool_options = @options.reject { |key| %i[device devices].include?(key) }
|
44
|
+
pool_options = @options.reject { |key| %i[device devices force_quit_simulator].include?(key) }
|
45
45
|
pool_options[:test_batch_results] = test_batch_results
|
46
46
|
|
47
47
|
pool = TestBatchWorkerPool.new(pool_options)
|
@@ -29,7 +29,9 @@ module TestCenter
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def derived_testrun_path(derived_data_path, scheme)
|
32
|
-
Dir.glob("#{derived_data_path}/Build/Products
|
32
|
+
xctestrun_files = Dir.glob("#{derived_data_path}/Build/Products/*.xctestrun")
|
33
|
+
xctestrun_files.sort { |f1, f2| File.mtime(f1) <=> File.mtime(f2) }
|
34
|
+
.last
|
33
35
|
end
|
34
36
|
|
35
37
|
def testables
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-test_center
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.8.0.parallelizing.beta.
|
4
|
+
version: 3.8.0.parallelizing.beta.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lyndsey Ferguson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|