fastlane-plugin-test_center 3.11.0 → 3.11.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bddea97ab673c1bd898093a97dbb8382f71a45b43c3383cd4324742f0074492a
|
4
|
+
data.tar.gz: 727b0661fc19d6a710f793b8f5f9392ea62a195891b1149a244dd5aefbaf10a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c686a799d1e1cc3d20066357b62e895ae68504b0438374958a3d1bea6da748bba1665fd5b8d77629d975ee0dd0d1fddb3ee4e992bee3e0773f3fde95dc009234
|
7
|
+
data.tar.gz: ffd5facb9d4e62ad79ae59852b5794bba8fabceb327e3aa628152d7004e1fba6c0694a1746fdbd186b9e474d3dc31820d2c453afeaab009778a3b8445d47b1b6
|
data/README.md
CHANGED
@@ -21,7 +21,7 @@ Have you ever spent too much time trying to fix fragile tests only to give up wi
|
|
21
21
|
|
22
22
|
## Features
|
23
23
|
|
24
|
-
This plugin makes testing your iOS app easier by providing you actions that give you greater control over everything related to testing your app.
|
24
|
+
This plugin makes testing your iOS app easier by providing you actions that give you greater control over everything related to testing your app.
|
25
25
|
|
26
26
|
`multi_scan` began when I created an action to only re-run the failed tests in order to determine if they were truly failing, or if they were failing randomly due to a fragile infrastructure. This action morphed into an entire plugin with many actions in the testing category.
|
27
27
|
|
@@ -35,6 +35,8 @@ _read the documentation on each action by clicking on the action name_
|
|
35
35
|
| [`suppress_tests_from_junit`](docs/feature_details/suppress_tests_from_junit.md) | suppress tests in an Xcode Scheme using those in a Junit test report | ios, mac |
|
36
36
|
| [`suppress_tests`](docs/feature_details/suppress_tests.md) | suppress tests in an Xcode Scheme | ios, mac |
|
37
37
|
| [`suppressed_tests`](docs/feature_details/suppressed_tests.md) | returns a list of the suppressed tests in your Xcode Project or Scheme | ios, mac |
|
38
|
+
| [`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 |
|
39
|
+
| [`testplans_from_scheme`](docs/feature_details/testplans_from_scheme.md) | returns the testplans that an Xcode Scheme references | ios, mac |
|
38
40
|
| [`tests_from_junit`](docs/feature_details/tests_from_junit.md) | returns the passing and failing tests in a Junit test report | ios, mac |
|
39
41
|
| [`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 |
|
40
42
|
| [`collate_junit_reports`](docs/feature_details/collate_junit_reports.md) | combines multiple Junit test reports into one report | ios, mac |
|
@@ -62,7 +64,7 @@ The most popular action in the `test_center` plugin is `multi_scan`, and if you
|
|
62
64
|
multi_scan(
|
63
65
|
project: File.absolute_path('../AtomicBoy/AtomicBoy.xcodeproj'),
|
64
66
|
scheme: 'AtomicBoy',
|
65
|
-
try_count: 3, # retry _failing_ tests up to three times^1.
|
67
|
+
try_count: 3, # retry _failing_ tests up to three times^1.
|
66
68
|
fail_build: false,
|
67
69
|
parallel_testrun_count: 4 # run subsets of your tests on parallel simulators^2
|
68
70
|
)
|
@@ -45,7 +45,7 @@ module TestCenter
|
|
45
45
|
|
46
46
|
derived_data_path = File.expand_path(@options[:derived_data_path] || Scan.config[:derived_data_path])
|
47
47
|
xcresults = Dir.glob("#{derived_data_path}/Logs/Test/*.xcresult")
|
48
|
-
if FastlaneCore::Helper.xcode_at_least?('11
|
48
|
+
if FastlaneCore::Helper.xcode_at_least?('11')
|
49
49
|
xcresults += Dir.glob("#{output_directory}/*.xcresult")
|
50
50
|
end
|
51
51
|
FastlaneCore::UI.verbose("Deleting xcresults:")
|
@@ -292,7 +292,7 @@ module TestCenter
|
|
292
292
|
end
|
293
293
|
|
294
294
|
def retrieve_test_operation_failure(test_session_last_messages)
|
295
|
-
if FastlaneCore::Helper.xcode_at_least?(11)
|
295
|
+
if FastlaneCore::Helper.xcode_at_least?('11')
|
296
296
|
retrieve_test_operation_failure_post_xcode11(test_session_last_messages)
|
297
297
|
else
|
298
298
|
retrieve_test_operation_failure_pre_xcode11(test_session_last_messages)
|
@@ -306,6 +306,8 @@ module TestCenter
|
|
306
306
|
test_operation_failure = 'Test device locked'
|
307
307
|
elsif /Test runner exited before starting test execution/ =~ test_session_last_messages
|
308
308
|
test_operation_failure = 'Test runner exited before starting test execution'
|
309
|
+
else
|
310
|
+
test_operation_failure = 'Unknown test operation failure'
|
309
311
|
end
|
310
312
|
test_operation_failure
|
311
313
|
end
|
@@ -346,15 +348,17 @@ module TestCenter
|
|
346
348
|
def move_test_result_bundle_for_next_run
|
347
349
|
return unless @options[:result_bundle]
|
348
350
|
|
349
|
-
|
351
|
+
result_extension = FastlaneCore::Helper.xcode_at_least?('11') ? '.xcresult' : '.test_result'
|
352
|
+
|
353
|
+
glob_pattern = "#{output_directory}/*#{result_extension}"
|
350
354
|
preexisting_test_result_bundles = Dir.glob(glob_pattern)
|
351
355
|
unnumbered_test_result_bundles = preexisting_test_result_bundles.reject do |test_result|
|
352
|
-
test_result =~ /.*-\d
|
356
|
+
test_result =~ /.*-\d+\#{result_extension}/
|
353
357
|
end
|
354
358
|
src_test_bundle = unnumbered_test_result_bundles.first
|
355
359
|
dst_test_bundle_parent_dir = File.dirname(src_test_bundle)
|
356
|
-
dst_test_bundle_basename = File.basename(src_test_bundle,
|
357
|
-
dst_test_bundle = "#{dst_test_bundle_parent_dir}/#{dst_test_bundle_basename}-#{@testrun_count}
|
360
|
+
dst_test_bundle_basename = File.basename(src_test_bundle, result_extension)
|
361
|
+
dst_test_bundle = "#{dst_test_bundle_parent_dir}/#{dst_test_bundle_basename}-#{@testrun_count}#{result_extension}"
|
358
362
|
FastlaneCore::UI.verbose("Moving test_result '#{src_test_bundle}' to '#{dst_test_bundle}'")
|
359
363
|
File.rename(src_test_bundle, dst_test_bundle)
|
360
364
|
end
|
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.11.
|
4
|
+
version: 3.11.1
|
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-06-
|
11
|
+
date: 2020-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -270,7 +270,6 @@ files:
|
|
270
270
|
- lib/fastlane/plugin/test_center/actions/test_options_from_testplan.rb
|
271
271
|
- lib/fastlane/plugin/test_center/actions/testplans_from_scheme.rb
|
272
272
|
- lib/fastlane/plugin/test_center/actions/tests_from_junit.rb
|
273
|
-
- lib/fastlane/plugin/test_center/actions/tests_from_xcresult.rb
|
274
273
|
- lib/fastlane/plugin/test_center/actions/tests_from_xctestrun.rb
|
275
274
|
- lib/fastlane/plugin/test_center/helper/html_test_report.rb
|
276
275
|
- lib/fastlane/plugin/test_center/helper/junit_helper.rb
|
@@ -1,82 +0,0 @@
|
|
1
|
-
module Fastlane
|
2
|
-
module Actions
|
3
|
-
module SharedValues
|
4
|
-
TESTS_FROM_XCRESULT_CUSTOM_VALUE = :TESTS_FROM_XCRESULT_CUSTOM_VALUE
|
5
|
-
end
|
6
|
-
|
7
|
-
class TestsFromXcresultAction < Action
|
8
|
-
def self.run(params)
|
9
|
-
# fastlane will take care of reading in the parameter and fetching the environment variable:
|
10
|
-
UI.message "Parameter API Token: #{params[:api_token]}"
|
11
|
-
|
12
|
-
# sh "shellcommand ./path"
|
13
|
-
|
14
|
-
# Actions.lane_context[SharedValues::TESTS_FROM_XCRESULT_CUSTOM_VALUE] = "my_val"
|
15
|
-
end
|
16
|
-
|
17
|
-
#####################################################
|
18
|
-
# @!group Documentation
|
19
|
-
#####################################################
|
20
|
-
|
21
|
-
def self.description
|
22
|
-
"A short description with <= 80 characters of what this action does"
|
23
|
-
end
|
24
|
-
|
25
|
-
def self.details
|
26
|
-
# Optional:
|
27
|
-
# this is your chance to provide a more detailed description of this action
|
28
|
-
"You can use this action to do cool things..."
|
29
|
-
end
|
30
|
-
|
31
|
-
def self.available_options
|
32
|
-
# Define all options your action supports.
|
33
|
-
|
34
|
-
# Below a few examples
|
35
|
-
[
|
36
|
-
FastlaneCore::ConfigItem.new(key: :api_token,
|
37
|
-
env_name: "FL_TESTS_FROM_XCRESULT_API_TOKEN", # The name of the environment variable
|
38
|
-
description: "API Token for TestsFromXcresultAction", # a short description of this parameter
|
39
|
-
verify_block: proc do |value|
|
40
|
-
UI.user_error!("No API token for TestsFromXcresultAction given, pass using `api_token: 'token'`") unless (value and not value.empty?)
|
41
|
-
# UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(value)
|
42
|
-
end),
|
43
|
-
FastlaneCore::ConfigItem.new(key: :development,
|
44
|
-
env_name: "FL_TESTS_FROM_XCRESULT_DEVELOPMENT",
|
45
|
-
description: "Create a development certificate instead of a distribution one",
|
46
|
-
is_string: false, # true: verifies the input is a string, false: every kind of value
|
47
|
-
default_value: false) # the default value if the user didn't provide one
|
48
|
-
]
|
49
|
-
end
|
50
|
-
|
51
|
-
def self.output
|
52
|
-
# Define the shared values you are going to provide
|
53
|
-
# Example
|
54
|
-
[
|
55
|
-
['TESTS_FROM_XCRESULT_CUSTOM_VALUE', 'A description of what this value contains']
|
56
|
-
]
|
57
|
-
end
|
58
|
-
|
59
|
-
def self.return_value
|
60
|
-
# If your method provides a return value, you can describe here what it does
|
61
|
-
end
|
62
|
-
|
63
|
-
def self.authors
|
64
|
-
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
|
65
|
-
["Your GitHub/Twitter Name"]
|
66
|
-
end
|
67
|
-
|
68
|
-
def self.is_supported?(platform)
|
69
|
-
# you can do things like
|
70
|
-
#
|
71
|
-
# true
|
72
|
-
#
|
73
|
-
# platform == :ios
|
74
|
-
#
|
75
|
-
# [:ios, :mac].include?(platform)
|
76
|
-
#
|
77
|
-
|
78
|
-
platform == :ios
|
79
|
-
end
|
80
|
-
end
|
81
|
-
end
|
82
|
-
end
|