fastlane-plugin-test_center 3.11.6 → 3.13.0
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/multi_scan.rb +9 -0
- data/lib/fastlane/plugin/test_center/actions/tests_from_xctestrun.rb +13 -3
- data/lib/fastlane/plugin/test_center/helper/test_collector.rb +4 -1
- data/lib/fastlane/plugin/test_center/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd3718fbdf6d40f912c0bec66d449e7e920961212f5dddf72a1960dba9429d24
|
4
|
+
data.tar.gz: a261932eb1cb2eb2d24f2d934df71cb3743ef6328a25c64648052678dd95ea3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f1324b7256876f8cd0f7d8a05c24ee4e72954443b652ed869a445c9edf3bb29c2b28b34b88dd7d79879cc26ddd2fd0366437781c8f75f757c54e86a5103ed7f
|
7
|
+
data.tar.gz: 9932b4bb2db2134e913ed25b79797612bd1796c9dc74938ac9fda788cb5c58b07cadfd94688552045898d2443de34767726c26f8623413483b22b280486d1e27
|
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 |
|
@@ -379,6 +379,15 @@ module Fastlane
|
|
379
379
|
"because the number of tests is unknown")
|
380
380
|
end
|
381
381
|
),
|
382
|
+
FastlaneCore::ConfigItem.new(
|
383
|
+
key: :swift_test_prefix,
|
384
|
+
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`",
|
385
|
+
default_value: "test",
|
386
|
+
optional: true,
|
387
|
+
verify_block: proc do |swift_test_prefix|
|
388
|
+
UI.user_error!("Error: swift_test_prefix must be non-nil and non-empty") if swift_test_prefix.nil? || swift_test_prefix.empty?
|
389
|
+
end
|
390
|
+
),
|
382
391
|
FastlaneCore::ConfigItem.new(
|
383
392
|
key: :quit_simulators,
|
384
393
|
env_name: "FL_MULTI_SCAN_QUIT_SIMULATORS",
|
@@ -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
|
@@ -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)
|
@@ -93,7 +95,8 @@ module TestCenter
|
|
93
95
|
::Fastlane::Actions::TestsFromXctestrunAction.available_options,
|
94
96
|
{
|
95
97
|
xctestrun: @xctestrun_path,
|
96
|
-
invocation_based_tests: @invocation_based_tests
|
98
|
+
invocation_based_tests: @invocation_based_tests,
|
99
|
+
swift_test_prefix: @swift_test_prefix
|
97
100
|
}
|
98
101
|
)
|
99
102
|
::Fastlane::Actions::TestsFromXctestrunAction.run(config)
|
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.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lyndsey Ferguson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
61
|
+
version: 1.2.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.
|
68
|
+
version: 1.2.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: colorize
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|