fastlane-plugin-test_center 3.11.6 → 3.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/fastlane/plugin/test_center/actions/collate_test_result_bundles.rb +6 -4
- data/lib/fastlane/plugin/test_center/actions/collate_xcresults.rb +9 -5
- data/lib/fastlane/plugin/test_center/actions/multi_scan.rb +92 -1
- data/lib/fastlane/plugin/test_center/actions/tests_from_xcresult.rb +103 -0
- data/lib/fastlane/plugin/test_center/actions/tests_from_xctestrun.rb +13 -3
- data/lib/fastlane/plugin/test_center/helper/multi_scan_manager/runner.rb +4 -3
- data/lib/fastlane/plugin/test_center/helper/test_collector.rb +66 -17
- data/lib/fastlane/plugin/test_center/version.rb +1 -1
- metadata +23 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5110e6b44d55945155e5769bf07fa9a1883521d125349f0d06211eea98014d14
|
|
4
|
+
data.tar.gz: ae0ffaa0f14c026a2ffdf2413f9b119142a130ba530742746715f2338cd058d2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 00eeb25839214b31b2cdf248f0daa5978fba3a3e1e03c31b994bf24b618e6fd56588a2e2c41c4b6610346892c5a4460db0df854c78014b2aafdf3ee1651b37cb
|
|
7
|
+
data.tar.gz: 4928830dfca2a60011d1435ee38532bebfb4d9e7b3887cd3088f1a7dcc26fe503028229b4d73d64e04d166ac21ee25d8bd8641a0a8b30e4eb96400e160d932e5
|
data/README.md
CHANGED
|
@@ -40,6 +40,7 @@ _read the documentation on each action by clicking on the action name_
|
|
|
40
40
|
| [`test_options_from_testplan`](docs/feature_details/test_options_from_testplan.md) | returns the tests and test code coverage configuration for a given testplan | ios, mac |
|
|
41
41
|
| [`testplans_from_scheme`](docs/feature_details/testplans_from_scheme.md) | returns the testplans that an Xcode Scheme references | ios, mac |
|
|
42
42
|
| [`tests_from_junit`](docs/feature_details/tests_from_junit.md) | returns the passing and failing tests in a Junit test report | ios, mac |
|
|
43
|
+
| [`tests_from_xcresult`](docs/feature_details/tests_from_xcresult.md) | returns the passing and failing tests in a xcresult bundle | ios, mac |
|
|
43
44
|
| [`tests_from_xctestrun`](docs/feature_details/tests_from_xctestrun.md) | returns a list of tests for each test target in a `xctestrun` file | ios, mac |
|
|
44
45
|
| [`collate_junit_reports`](docs/feature_details/collate_junit_reports.md) | combines multiple Junit test reports into one report | ios, mac |
|
|
45
46
|
| [`collate_html_reports`](docs/feature_details/collate_html_reports.md) | combines multiple HTML test reports into one report | ios, mac |
|
|
@@ -221,10 +221,12 @@ module Fastlane
|
|
|
221
221
|
'collate the test_result bundles to a temporary bundle \"result.test_result\"'
|
|
222
222
|
)
|
|
223
223
|
bundles = Dir['../spec/fixtures/*.test_result'].map { |relpath| File.absolute_path(relpath) }
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
224
|
+
Dir.mktmpdir('test_output') do |dir|
|
|
225
|
+
collate_test_result_bundles(
|
|
226
|
+
bundles: bundles,
|
|
227
|
+
collated_bundle: File.join(dir, 'result.test_result')
|
|
228
|
+
)
|
|
229
|
+
end
|
|
228
230
|
"
|
|
229
231
|
]
|
|
230
232
|
end
|
|
@@ -86,15 +86,19 @@ module Fastlane
|
|
|
86
86
|
def self.example_code
|
|
87
87
|
[
|
|
88
88
|
"
|
|
89
|
+
require 'tmpdir'
|
|
90
|
+
|
|
89
91
|
UI.important(
|
|
90
92
|
'example: ' \\
|
|
91
93
|
'collate the xcresult bundles to a temporary xcresult bundle \"result.xcresult\"'
|
|
92
94
|
)
|
|
93
|
-
xcresults = Dir['../spec/fixtures
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
xcresults = Dir['../spec/fixtures/AtomicBoyUITests-batch-{3,4}/result.xcresult'].map { |relpath| File.absolute_path(relpath) }
|
|
96
|
+
Dir.mktmpdir('test_output') do |dir|
|
|
97
|
+
collate_xcresults(
|
|
98
|
+
xcresults: xcresults,
|
|
99
|
+
collated_xcresult: File.join(dir, 'result.xcresult')
|
|
100
|
+
)
|
|
101
|
+
end
|
|
98
102
|
"
|
|
99
103
|
]
|
|
100
104
|
end
|
|
@@ -171,7 +171,10 @@ module Fastlane
|
|
|
171
171
|
use_scanfile_to_override_settings(scan_options)
|
|
172
172
|
turn_off_concurrent_workers(scan_options)
|
|
173
173
|
UI.important("Turning off :skip_build as it doesn't do anything with multi_scan") if scan_options[:skip_build]
|
|
174
|
-
scan_options
|
|
174
|
+
if scan_options[:disable_xcpretty]
|
|
175
|
+
UI.important("Turning off :disable_xcpretty as xcpretty is needed to generate junit reports for retrying failed tests")
|
|
176
|
+
end
|
|
177
|
+
scan_options.reject! { |k,v| %i[skip_build disable_xcpretty].include?(k) }
|
|
175
178
|
ScanHelper.remove_preexisting_simulator_logs(scan_options)
|
|
176
179
|
if scan_options[:test_without_building]
|
|
177
180
|
UI.verbose("Preparing Scan config options for multi_scan testing")
|
|
@@ -379,6 +382,15 @@ module Fastlane
|
|
|
379
382
|
"because the number of tests is unknown")
|
|
380
383
|
end
|
|
381
384
|
),
|
|
385
|
+
FastlaneCore::ConfigItem.new(
|
|
386
|
+
key: :swift_test_prefix,
|
|
387
|
+
description: "The prefix used to find test methods. In standard XCTests, this is `test`. If you are using Quick with Swift, set this to `spec`",
|
|
388
|
+
default_value: "test",
|
|
389
|
+
optional: true,
|
|
390
|
+
verify_block: proc do |swift_test_prefix|
|
|
391
|
+
UI.user_error!("Error: swift_test_prefix must be non-nil and non-empty") if swift_test_prefix.nil? || swift_test_prefix.empty?
|
|
392
|
+
end
|
|
393
|
+
),
|
|
382
394
|
FastlaneCore::ConfigItem.new(
|
|
383
395
|
key: :quit_simulators,
|
|
384
396
|
env_name: "FL_MULTI_SCAN_QUIT_SIMULATORS",
|
|
@@ -478,6 +490,85 @@ module Fastlane
|
|
|
478
490
|
]
|
|
479
491
|
end
|
|
480
492
|
|
|
493
|
+
def self.integration_tests
|
|
494
|
+
[
|
|
495
|
+
"
|
|
496
|
+
UI.header('Basic test')
|
|
497
|
+
multi_scan(
|
|
498
|
+
workspace: File.absolute_path('../AtomicBoy/AtomicBoy.xcworkspace'),
|
|
499
|
+
scheme: 'AtomicBoy',
|
|
500
|
+
fail_build: false,
|
|
501
|
+
try_count: 2,
|
|
502
|
+
disable_xcpretty: true
|
|
503
|
+
)
|
|
504
|
+
",
|
|
505
|
+
"
|
|
506
|
+
UI.header('Basic test with 1 specific test')
|
|
507
|
+
multi_scan(
|
|
508
|
+
workspace: File.absolute_path('../AtomicBoy/AtomicBoy.xcworkspace'),
|
|
509
|
+
scheme: 'AtomicBoy',
|
|
510
|
+
fail_build: false,
|
|
511
|
+
try_count: 2,
|
|
512
|
+
only_testing: ['AtomicBoyUITests/AtomicBoyUITests/testExample']
|
|
513
|
+
)
|
|
514
|
+
",
|
|
515
|
+
"
|
|
516
|
+
UI.header('Basic test with test target expansion')
|
|
517
|
+
multi_scan(
|
|
518
|
+
workspace: File.absolute_path('../AtomicBoy/AtomicBoy.xcworkspace'),
|
|
519
|
+
scheme: 'AtomicBoy',
|
|
520
|
+
fail_build: false,
|
|
521
|
+
try_count: 2,
|
|
522
|
+
only_testing: ['AtomicBoyUITests', 'AtomicBoyTests']
|
|
523
|
+
)
|
|
524
|
+
",
|
|
525
|
+
"
|
|
526
|
+
UI.header('Parallel test run')
|
|
527
|
+
multi_scan(
|
|
528
|
+
workspace: File.absolute_path('../AtomicBoy/AtomicBoy.xcworkspace'),
|
|
529
|
+
scheme: 'AtomicBoy',
|
|
530
|
+
fail_build: false,
|
|
531
|
+
try_count: 2,
|
|
532
|
+
parallel_testrun_count: 2
|
|
533
|
+
)
|
|
534
|
+
",
|
|
535
|
+
"
|
|
536
|
+
UI.header('Parallel test run with fewer tests than parallel test runs')
|
|
537
|
+
multi_scan(
|
|
538
|
+
workspace: File.absolute_path('../AtomicBoy/AtomicBoy.xcworkspace'),
|
|
539
|
+
scheme: 'AtomicBoy',
|
|
540
|
+
fail_build: false,
|
|
541
|
+
try_count: 2,
|
|
542
|
+
parallel_testrun_count: 4,
|
|
543
|
+
only_testing: ['AtomicBoyUITests/AtomicBoyUITests/testExample']
|
|
544
|
+
)
|
|
545
|
+
",
|
|
546
|
+
"
|
|
547
|
+
UI.header('Basic test with batches')
|
|
548
|
+
multi_scan(
|
|
549
|
+
workspace: File.absolute_path('../AtomicBoy/AtomicBoy.xcworkspace'),
|
|
550
|
+
scheme: 'AtomicBoy',
|
|
551
|
+
fail_build: false,
|
|
552
|
+
try_count: 2,
|
|
553
|
+
batch_count: 2
|
|
554
|
+
)
|
|
555
|
+
",
|
|
556
|
+
"
|
|
557
|
+
UI.header('Basic test with xcresult')
|
|
558
|
+
multi_scan(
|
|
559
|
+
workspace: File.absolute_path('../AtomicBoy/AtomicBoy.xcworkspace'),
|
|
560
|
+
scheme: 'AtomicBoy',
|
|
561
|
+
output_types: 'xcresult',
|
|
562
|
+
output_files: 'result.xcresult',
|
|
563
|
+
collate_reports: false,
|
|
564
|
+
fail_build: false,
|
|
565
|
+
try_count: 2,
|
|
566
|
+
batch_count: 2
|
|
567
|
+
)
|
|
568
|
+
"
|
|
569
|
+
]
|
|
570
|
+
end
|
|
571
|
+
|
|
481
572
|
def self.authors
|
|
482
573
|
["lyndsey-ferguson/@lyndseydf"]
|
|
483
574
|
end
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
require 'trainer'
|
|
2
|
+
require 'shellwords'
|
|
3
|
+
|
|
4
|
+
module Fastlane
|
|
5
|
+
module Actions
|
|
6
|
+
class TestsFromXcresultAction < Action
|
|
7
|
+
def self.run(params)
|
|
8
|
+
unless FastlaneCore::Helper.xcode_at_least?('11.0.0')
|
|
9
|
+
UI.error("Error: tests_from_xcresult requires at least Xcode 11.0")
|
|
10
|
+
return {}
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
xcresult_path = File.absolute_path(params[:xcresult])
|
|
14
|
+
|
|
15
|
+
# taken from the rubygem trainer, in the test_parser.rb module
|
|
16
|
+
result_bundle_object_raw = sh("xcrun xcresulttool get --path #{xcresult_path.shellescape} --format json", print_command: false, print_command_output: false)
|
|
17
|
+
result_bundle_object = JSON.parse(result_bundle_object_raw)
|
|
18
|
+
|
|
19
|
+
# Parses JSON into ActionsInvocationRecord to find a list of all ids for ActionTestPlanRunSummaries
|
|
20
|
+
actions_invocation_record = Trainer::XCResult::ActionsInvocationRecord.new(result_bundle_object)
|
|
21
|
+
test_refs = actions_invocation_record.actions.map do |action|
|
|
22
|
+
action.action_result.tests_ref
|
|
23
|
+
end.compact
|
|
24
|
+
|
|
25
|
+
ids = test_refs.map(&:id)
|
|
26
|
+
summaries = ids.map do |id|
|
|
27
|
+
raw = sh("xcrun xcresulttool get --format json --path #{xcresult_path.shellescape} --id #{id}", print_command: false, print_command_output: false)
|
|
28
|
+
json = JSON.parse(raw)
|
|
29
|
+
Trainer::XCResult::ActionTestPlanRunSummaries.new(json)
|
|
30
|
+
end
|
|
31
|
+
failures = actions_invocation_record.issues.test_failure_summaries || []
|
|
32
|
+
all_summaries = summaries.map(&:summaries).flatten
|
|
33
|
+
testable_summaries = all_summaries.map(&:testable_summaries).flatten
|
|
34
|
+
failed = []
|
|
35
|
+
passing = []
|
|
36
|
+
failure_details = {}
|
|
37
|
+
rows = testable_summaries.map do |testable_summary|
|
|
38
|
+
all_tests = testable_summary.all_tests.flatten
|
|
39
|
+
all_tests.each do |t|
|
|
40
|
+
if t.test_status == 'Success'
|
|
41
|
+
passing << "#{t.parent.name}/#{t.identifier}"
|
|
42
|
+
else
|
|
43
|
+
test_identifier = "#{t.parent.name}/#{t.identifier}"
|
|
44
|
+
failed << test_identifier
|
|
45
|
+
failure = t.find_failure(failures)
|
|
46
|
+
if failure
|
|
47
|
+
failure_details[test_identifier] = {
|
|
48
|
+
message: failure.failure_message
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
{
|
|
55
|
+
failed: failed.uniq,
|
|
56
|
+
passing: passing.uniq,
|
|
57
|
+
failure_details: failure_details
|
|
58
|
+
}
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
#####################################################
|
|
62
|
+
# @!group Documentation
|
|
63
|
+
#####################################################
|
|
64
|
+
|
|
65
|
+
def self.description
|
|
66
|
+
"☑️ Retrieves the failing and passing tests as reportedn an xcresult bundle"
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def self.available_options
|
|
71
|
+
[
|
|
72
|
+
FastlaneCore::ConfigItem.new(
|
|
73
|
+
key: :xcresult,
|
|
74
|
+
env_name: "FL_TESTS_FROM_XCRESULT_XCRESULT_PATH",
|
|
75
|
+
description: "The path to the xcresult bundle to retrieve the tests from",
|
|
76
|
+
verify_block: proc do |path|
|
|
77
|
+
UI.user_error!("Error: cannot find the xcresult bundle at '#{path}'") unless Dir.exist?(path)
|
|
78
|
+
UI.user_error!("Error: cannot parse files that are not in the xcresult format") unless File.extname(path) == ".xcresult"
|
|
79
|
+
end
|
|
80
|
+
)
|
|
81
|
+
]
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def self.return_value
|
|
85
|
+
"A Hash with information about the test results:\r\n" \
|
|
86
|
+
"failed: an Array of the failed test identifiers\r\n" \
|
|
87
|
+
"passing: an Array of the passing test identifiers\r\n"
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def self.authors
|
|
91
|
+
["lyndsey-ferguson/lyndseydf"]
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
def self.category
|
|
95
|
+
:testing
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
def self.is_supported?(platform)
|
|
99
|
+
%i[ios mac].include?(platform)
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
@@ -5,10 +5,10 @@ module Fastlane
|
|
|
5
5
|
class TestsFromXctestrunAction < Action
|
|
6
6
|
def self.run(params)
|
|
7
7
|
UI.verbose("Getting tests from xctestrun file at '#{params[:xctestrun]}'")
|
|
8
|
-
return xctestrun_tests(params[:xctestrun], params[:invocation_based_tests])
|
|
8
|
+
return xctestrun_tests(params[:xctestrun], params[:invocation_based_tests], swift_test_prefix: params[:swift_test_prefix])
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
def self.xctestrun_tests(xctestrun_path, invocation_based_tests)
|
|
11
|
+
def self.xctestrun_tests(xctestrun_path, invocation_based_tests, swift_test_prefix: "test")
|
|
12
12
|
xctestrun = Plist.parse_xml(xctestrun_path)
|
|
13
13
|
xctestrun_rootpath = File.dirname(xctestrun_path)
|
|
14
14
|
xctestrun_version = xctestrun.fetch('__xctestrun_metadata__', Hash.new).fetch('FormatVersion', 1)
|
|
@@ -39,7 +39,7 @@ module Fastlane
|
|
|
39
39
|
test_identifiers = xctestrun_config['OnlyTestIdentifiers']
|
|
40
40
|
UI.verbose("Identifiers after adding onlytest tests: #{test_identifiers.join("\n\t")}")
|
|
41
41
|
else
|
|
42
|
-
test_identifiers = XCTestList.tests(xctest_path)
|
|
42
|
+
test_identifiers = XCTestList.tests(xctest_path, swift_test_prefix: swift_test_prefix)
|
|
43
43
|
UI.verbose("Found the following tests: #{test_identifiers.join("\n\t")}")
|
|
44
44
|
end
|
|
45
45
|
if xctestrun_config.key?('SkipTestIdentifiers')
|
|
@@ -52,6 +52,7 @@ module Fastlane
|
|
|
52
52
|
if test_identifiers.empty? && !invocation_based_tests
|
|
53
53
|
UI.error("No tests found in '#{xctest_path}'!")
|
|
54
54
|
UI.important("Is the Build Setting, `ENABLE_TESTABILITY` enabled for the test target #{testable_name}?")
|
|
55
|
+
UI.message("If your Swift test method names use a prefix other than `test`, consider setting `:swift_test_prefix`.")
|
|
55
56
|
end
|
|
56
57
|
tests[testable_name] = test_identifiers.map do |test_identifier|
|
|
57
58
|
"#{testable_name}/#{test_identifier}"
|
|
@@ -116,6 +117,15 @@ module Fastlane
|
|
|
116
117
|
is_string: false,
|
|
117
118
|
default_value: false,
|
|
118
119
|
optional: true
|
|
120
|
+
),
|
|
121
|
+
FastlaneCore::ConfigItem.new(
|
|
122
|
+
key: :swift_test_prefix,
|
|
123
|
+
description: "The prefix used to find test methods. In standard XCTests, this is `test`. If you are using Quick with Swift, set this to `spec`",
|
|
124
|
+
default_value: "test",
|
|
125
|
+
optional: true,
|
|
126
|
+
verify_block: proc do |swift_test_prefix|
|
|
127
|
+
UI.user_error!("Error: swift_test_prefix must be non-nil and non-empty") if swift_test_prefix.nil? || swift_test_prefix.empty?
|
|
128
|
+
end
|
|
119
129
|
)
|
|
120
130
|
]
|
|
121
131
|
end
|
|
@@ -66,9 +66,10 @@ module TestCenter
|
|
|
66
66
|
@test_collector = TestCollector.new(@options)
|
|
67
67
|
@options.reject! { |key| %i[testplan].include?(key) }
|
|
68
68
|
@batch_count = @test_collector.test_batches.size
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
tests = @test_collector.test_batches.flatten
|
|
70
|
+
if tests.size < @options[:parallel_testrun_count].to_i
|
|
71
|
+
FastlaneCore::UI.important(":parallel_testrun_count greater than the number of tests (#{tests.size}). Reducing to that number.")
|
|
72
|
+
@options[:parallel_testrun_count] = tests.size
|
|
72
73
|
end
|
|
73
74
|
end
|
|
74
75
|
|
|
@@ -26,6 +26,8 @@ module TestCenter
|
|
|
26
26
|
if @batch_count == 1 && options[:parallel_testrun_count] > 1
|
|
27
27
|
@batch_count = options[:parallel_testrun_count]
|
|
28
28
|
end
|
|
29
|
+
|
|
30
|
+
@swift_test_prefix = options[:swift_test_prefix]
|
|
29
31
|
end
|
|
30
32
|
|
|
31
33
|
def only_testing_from_testplan(options)
|
|
@@ -89,30 +91,77 @@ module TestCenter
|
|
|
89
91
|
end
|
|
90
92
|
|
|
91
93
|
def xctestrun_known_tests
|
|
92
|
-
|
|
93
|
-
::
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
94
|
+
unless @known_tests
|
|
95
|
+
config = FastlaneCore::Configuration.create(
|
|
96
|
+
::Fastlane::Actions::TestsFromXctestrunAction.available_options,
|
|
97
|
+
{
|
|
98
|
+
xctestrun: @xctestrun_path,
|
|
99
|
+
invocation_based_tests: @invocation_based_tests,
|
|
100
|
+
swift_test_prefix: @swift_test_prefix
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
@known_tests = ::Fastlane::Actions::TestsFromXctestrunAction.run(config)
|
|
104
|
+
end
|
|
105
|
+
@known_tests
|
|
100
106
|
end
|
|
101
107
|
|
|
102
|
-
def
|
|
108
|
+
def expand_short_testidentifiers_to_tests(testables_tests)
|
|
109
|
+
# Remember, testable_tests is of the format:
|
|
110
|
+
# {
|
|
111
|
+
# 'testable1' => [
|
|
112
|
+
# 'testsuite1/testcase1',
|
|
113
|
+
# 'testsuite1/testcase2',
|
|
114
|
+
# 'testsuite2/testcase1',
|
|
115
|
+
# 'testsuite2/testcase2',
|
|
116
|
+
# ...
|
|
117
|
+
# 'testsuiteN/testcase1', ... 'testsuiteN/testcaseM'
|
|
118
|
+
# ],
|
|
119
|
+
# ...
|
|
120
|
+
# 'testableO' => [
|
|
121
|
+
# 'testsuite1/testcase1',
|
|
122
|
+
# 'testsuite1/testcase2',
|
|
123
|
+
# 'testsuite2/testcase1',
|
|
124
|
+
# 'testsuite2/testcase2',
|
|
125
|
+
# ...
|
|
126
|
+
# 'testsuiteN/testcase1', ... 'testsuiteN/testcaseM'
|
|
127
|
+
# ]
|
|
128
|
+
# }
|
|
103
129
|
return if @invocation_based_tests
|
|
104
130
|
|
|
131
|
+
# iterate among all the test identifers for each testable
|
|
132
|
+
# A test identifier is seperated into components by '/'
|
|
133
|
+
# if a test identifier has only 2 separators, it probably is
|
|
134
|
+
# 'testable/testsuite' (but it could be 'testsuite/testcase' )
|
|
135
|
+
all_known_tests = nil
|
|
105
136
|
known_tests = []
|
|
106
|
-
|
|
137
|
+
testables_tests.each do |testable, tests|
|
|
107
138
|
tests.each_with_index do |test, index|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
139
|
+
test_components = test.split('/')
|
|
140
|
+
is_full_test_identifier = (test_components.size == 3)
|
|
141
|
+
next if is_full_test_identifier
|
|
142
|
+
|
|
143
|
+
all_known_tests ||= xctestrun_known_tests.clone
|
|
144
|
+
|
|
145
|
+
testsuite = ''
|
|
146
|
+
if test_components.size == 1
|
|
147
|
+
if test_components[0] == testable
|
|
148
|
+
# The following || [] is just in case the user provided multiple
|
|
149
|
+
# test targets or there are no actual tests found.
|
|
150
|
+
testables_tests[testable][index] = all_known_tests[testable] || []
|
|
151
|
+
all_known_tests.delete(testable)
|
|
152
|
+
next
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
testsuite = test_components[0]
|
|
156
|
+
else
|
|
157
|
+
testsuite = test_components[1]
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
testables_tests[testable][index], all_known_tests[testable] = all_known_tests[testable].partition do |known_test|
|
|
161
|
+
known_test.split('/')[1] == testsuite
|
|
113
162
|
end
|
|
114
163
|
end
|
|
115
|
-
|
|
164
|
+
testables_tests[testable].flatten!
|
|
116
165
|
end
|
|
117
166
|
end
|
|
118
167
|
|
|
@@ -120,7 +169,7 @@ module TestCenter
|
|
|
120
169
|
unless @testables_tests
|
|
121
170
|
if @only_testing
|
|
122
171
|
@testables_tests = only_testing_to_testables_tests
|
|
123
|
-
|
|
172
|
+
expand_short_testidentifiers_to_tests(@testables_tests)
|
|
124
173
|
else
|
|
125
174
|
@testables_tests = xctestrun_known_tests
|
|
126
175
|
if @skip_testing
|
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.
|
|
4
|
+
version: 3.14.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Lyndsey Ferguson
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-09-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|
|
@@ -38,6 +38,20 @@ dependencies:
|
|
|
38
38
|
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '0'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: trainer
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - ">="
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '0'
|
|
48
|
+
type: :runtime
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ">="
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
41
55
|
- !ruby/object:Gem::Dependency
|
|
42
56
|
name: xcodeproj
|
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -58,14 +72,14 @@ dependencies:
|
|
|
58
72
|
requirements:
|
|
59
73
|
- - ">="
|
|
60
74
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: 1.1
|
|
75
|
+
version: 1.2.1
|
|
62
76
|
type: :runtime
|
|
63
77
|
prerelease: false
|
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
79
|
requirements:
|
|
66
80
|
- - ">="
|
|
67
81
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: 1.1
|
|
82
|
+
version: 1.2.1
|
|
69
83
|
- !ruby/object:Gem::Dependency
|
|
70
84
|
name: colorize
|
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -270,6 +284,7 @@ files:
|
|
|
270
284
|
- lib/fastlane/plugin/test_center/actions/test_options_from_testplan.rb
|
|
271
285
|
- lib/fastlane/plugin/test_center/actions/testplans_from_scheme.rb
|
|
272
286
|
- lib/fastlane/plugin/test_center/actions/tests_from_junit.rb
|
|
287
|
+
- lib/fastlane/plugin/test_center/actions/tests_from_xcresult.rb
|
|
273
288
|
- lib/fastlane/plugin/test_center/actions/tests_from_xctestrun.rb
|
|
274
289
|
- lib/fastlane/plugin/test_center/helper/fastlane_core/device_manager/simulator_extensions.rb
|
|
275
290
|
- lib/fastlane/plugin/test_center/helper/html_test_report.rb
|
|
@@ -295,7 +310,7 @@ homepage: https://github.com/lyndsey-ferguson/fastlane-plugin-test_center
|
|
|
295
310
|
licenses:
|
|
296
311
|
- MIT
|
|
297
312
|
metadata: {}
|
|
298
|
-
post_install_message:
|
|
313
|
+
post_install_message:
|
|
299
314
|
rdoc_options: []
|
|
300
315
|
require_paths:
|
|
301
316
|
- lib
|
|
@@ -310,8 +325,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
310
325
|
- !ruby/object:Gem::Version
|
|
311
326
|
version: '0'
|
|
312
327
|
requirements: []
|
|
313
|
-
rubygems_version: 3.
|
|
314
|
-
signing_key:
|
|
328
|
+
rubygems_version: 3.1.2
|
|
329
|
+
signing_key:
|
|
315
330
|
specification_version: 4
|
|
316
331
|
summary: Makes testing your iOS app easier
|
|
317
332
|
test_files: []
|