fastlane-plugin-test_center 0.5.0 → 1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 40ba8db5eb5707650f3ddd74ceee5a58f1f44f5d
4
- data.tar.gz: 3a3e481b05ae0b53bde7a942589449c6f0ba4aaa
3
+ metadata.gz: f2a4eab0e48a0368b7ed7b596ade9b9d01eb9d96
4
+ data.tar.gz: 2abbb33b228295a82074eeea475f25d4b5922a61
5
5
  SHA512:
6
- metadata.gz: 60cd6052f5245ce7fabe12c1594d7cfe923a4016107a79a8dbc123755f89f7aa7ea123e24e75a65ef48313a1457faf37ecb35ea422263276ac007a6b3522ed65
7
- data.tar.gz: 9e93b53367284accaba1e28964ffbfd6ee79fbcee6f9fc5b20706d4fc35fac19d7d6fed544e72f144d42529b5cf2511da4cc476b3e77c63132060c2785b9e6be
6
+ metadata.gz: d29a3717f7295a40bfa0e296e7fc66439eda6ced5eaeb1e1a6bd3111fdef48c3886daccc3f912ab82eae5944001bf432a54aa29cfa9946f479a5ffd292978802
7
+ data.tar.gz: ff94f2678cf27e35c0643e928c935fce5f2725d4998b978f9f2572843104ff142e7ac171759350e56434a8eaf18ea8b5cb5fb0119075fcc6f06ac82ca1f11c9d
data/README.md CHANGED
@@ -12,16 +12,22 @@ fastlane add_plugin test_center
12
12
 
13
13
  ## About test_center
14
14
 
15
- Makes testing your iOS app easier
16
-
17
- **Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
15
+ This plugin makes testing your iOS app easier by providing you actions that allow
16
+ you to run the fastlane `scan` action multiple times and retrying only failed
17
+ tests, retrieve which tests failed during `scan`, and suppressing given tests in
18
+ an Xcode project.
19
+
20
+ This fastlane plugin includes the following actions:
21
+ - `multi_scan`: uses scan to run Xcode tests a given number of times: only re-testing failing tests
22
+ - `suppress_tests_from_junit`: uses a junit xml report file to suppress either passing or failing tests in an Xcode Scheme
23
+ - `suppress_tests`: suppresses specific tests in a specific or all Xcode Schemes in a given project
24
+ - `suppressed_tests`: retrieves a list of tests that are suppressed in a specific or all Xcode Schemes in a project
25
+ - `tests_from_junit`: retrieves the failing and passing tests as reported in a junit xml file
18
26
 
19
27
  ## Example
20
28
 
21
29
  Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
22
30
 
23
- **Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
24
-
25
31
  ## Run tests for this plugin
26
32
 
27
33
  To run both the tests, and code style validation, run
@@ -71,25 +71,23 @@ module Fastlane
71
71
  #####################################################
72
72
 
73
73
  def self.description
74
- "A short description with <= 80 characters of what this action does"
74
+ "Uses scan to run Xcode tests a given number of times: only re-testing failing tests."
75
75
  end
76
76
 
77
77
  def self.details
78
- # Optional:
79
- # this is your chance to provide a more detailed description of this action
80
- "You can use this action to do cool things..."
78
+ "Use this action to run your tests if you have fragile tests that fail sporadically."
81
79
  end
82
80
 
83
81
  def self.scan_options
84
- ScanAction.available_options.reject { |config_item| config_item.key == :output_files }
82
+ ScanAction.available_options
85
83
  end
86
84
 
87
85
  def self.available_options
88
86
  scan_options + [
89
87
  FastlaneCore::ConfigItem.new(
90
88
  key: :try_count,
91
- env_name: "FL_MULTI_SCAN_TRY_COUNT", # The name of the environment variable
92
- description: "The number of times to retry running tests via scan", # a short description of this parameter
89
+ env_name: "FL_MULTI_SCAN_TRY_COUNT",
90
+ description: "The number of times to retry running tests via scan",
93
91
  type: Integer,
94
92
  is_string: false,
95
93
  default_value: 1
@@ -97,33 +95,11 @@ module Fastlane
97
95
  ]
98
96
  end
99
97
 
100
- def self.output
101
- # Define the shared values you are going to provide
102
- # Example
103
- [
104
- ['MULTI_SCAN_CUSTOM_VALUE', 'A description of what this value contains']
105
- ]
106
- end
107
-
108
- def self.return_value
109
- # If your method provides a return value, you can describe here what it does
110
- end
111
-
112
98
  def self.authors
113
- # So no one will ever forget your contribution to fastlane :) You are awesome btw!
114
- ["Your GitHub/Twitter Name"]
99
+ ["lyndsey-ferguson/@ldferguson"]
115
100
  end
116
101
 
117
102
  def self.is_supported?(platform)
118
- # you can do things like
119
- #
120
- # true
121
- #
122
- # platform == :ios
123
- #
124
- # [:ios, :mac].include?(platform)
125
- #
126
-
127
103
  platform == :ios
128
104
  end
129
105
  end
@@ -1,9 +1,5 @@
1
1
  module Fastlane
2
2
  module Actions
3
- module SharedValues
4
- SUPPRESS_TESTS_CUSTOM_VALUE = :SUPPRESS_TESTS_CUSTOM_VALUE
5
- end
6
-
7
3
  class SuppressTestsAction < Action
8
4
  require 'xcodeproj'
9
5
 
@@ -38,24 +34,15 @@ module Fastlane
38
34
  #####################################################
39
35
 
40
36
  def self.description
41
- "A short description with <= 80 characters of what this action does"
42
- end
43
-
44
- def self.details
45
- # Optional:
46
- # this is your chance to provide a more detailed description of this action
47
- "You can use this action to do cool things..."
37
+ "Suppresses specific tests in a specific or all Xcode Schemes in a given project"
48
38
  end
49
39
 
50
40
  def self.available_options
51
- # Define all options your action supports.
52
-
53
- # Below a few examples
54
41
  [
55
42
  FastlaneCore::ConfigItem.new(
56
43
  key: :xcodeproj,
57
- env_name: "FL_SUPPRESS_TESTS_XCODE_PROJECT", # The name of the environment variable
58
- description: "The file path to the Xcode project file to modify", # a short description of this parameter
44
+ env_name: "FL_SUPPRESS_TESTS_XCODE_PROJECT",
45
+ description: "The file path to the Xcode project file to modify",
59
46
  verify_block: proc do |path|
60
47
  UI.user_error!("Error: Xcode project file path not given!") unless path and !path.empty?
61
48
  UI.user_error!("Error: Xcode project '#{path}' not found!") unless Dir.exist?(path)
@@ -63,8 +50,8 @@ module Fastlane
63
50
  ),
64
51
  FastlaneCore::ConfigItem.new(
65
52
  key: :tests,
66
- env_name: "FL_SUPPRESS_TESTS_TESTS_TO_SUPPRESS", # The name of the environment variable
67
- description: "A list of tests to suppress", # a short description of this parameter
53
+ env_name: "FL_SUPPRESS_TESTS_TESTS_TO_SUPPRESS",
54
+ description: "A list of tests to suppress",
68
55
  verify_block: proc do |tests|
69
56
  UI.user_error!("Error: no tests were given to suppress!") unless tests and !tests.empty?
70
57
  tests.each do |test_identifier|
@@ -79,8 +66,8 @@ module Fastlane
79
66
  FastlaneCore::ConfigItem.new(
80
67
  key: :scheme,
81
68
  optional: true,
82
- env_name: "FL_SUPPRESS_TESTS_SCHEME_TO_UPDATE", # The name of the environment variable
83
- description: "The Xcode scheme where the tests should be suppressed", # a short description of this parameter
69
+ env_name: "FL_SUPPRESS_TESTS_SCHEME_TO_UPDATE",
70
+ description: "The Xcode scheme where the tests should be suppressed",
84
71
  verify_block: proc do |scheme_name|
85
72
  UI.user_error!("Error: Xcode Scheme '#{scheme_name}' is not valid!") if scheme_name and scheme_name.empty?
86
73
  end
@@ -88,33 +75,11 @@ module Fastlane
88
75
  ]
89
76
  end
90
77
 
91
- def self.output
92
- # Define the shared values you are going to provide
93
- # Example
94
- [
95
- ['SUPPRESS_TESTS_CUSTOM_VALUE', 'A description of what this value contains']
96
- ]
97
- end
98
-
99
- def self.return_value
100
- # If your method provides a return value, you can describe here what it does
101
- end
102
-
103
78
  def self.authors
104
- # So no one will ever forget your contribution to fastlane :) You are awesome btw!
105
- ["Your GitHub/Twitter Name"]
79
+ ["lyndsey-ferguson/@ldferguson"]
106
80
  end
107
81
 
108
82
  def self.is_supported?(platform)
109
- # you can do things like
110
- #
111
- # true
112
- #
113
- # platform == :ios
114
- #
115
- # [:ios, :mac].include?(platform)
116
- #
117
-
118
83
  platform == :ios
119
84
  end
120
85
  end
@@ -1,9 +1,5 @@
1
1
  module Fastlane
2
2
  module Actions
3
- module SharedValues
4
- SUPPRESS_TESTS_FROM_JUNIT_CUSTOM_VALUE = :SUPPRESS_TESTS_FROM_JUNIT_CUSTOM_VALUE
5
- end
6
-
7
3
  class SuppressTestsFromJunitAction < Action
8
4
  def self.run(params)
9
5
  project_path = params[:xcodeproj]
@@ -94,16 +90,12 @@ module Fastlane
94
90
  "Uses a junit xml report file to suppress either passing or failing tests in an Xcode Scheme"
95
91
  end
96
92
 
97
- def self.details
98
- "To be added"
99
- end
100
-
101
93
  def self.available_options
102
94
  [
103
95
  FastlaneCore::ConfigItem.new(
104
96
  key: :xcodeproj,
105
- env_name: "FL_SUPPRESS_TESTS_FROM_JUNIT_XCODE_PROJECT", # The name of the environment variable
106
- description: "The file path to the Xcode project file to modify", # a short description of this parameter
97
+ env_name: "FL_SUPPRESS_TESTS_FROM_JUNIT_XCODE_PROJECT",
98
+ description: "The file path to the Xcode project file to modify",
107
99
  verify_block: proc do |path|
108
100
  UI.user_error!("Error: Xcode project file path not given!") unless path and !path.empty?
109
101
  UI.user_error!("Error: Xcode project '#{path}' not found!") unless Dir.exist?(path)
@@ -111,7 +103,7 @@ module Fastlane
111
103
  ),
112
104
  FastlaneCore::ConfigItem.new(
113
105
  key: :junit,
114
- env_name: "FL_SUPPRESS_TESTS_FROM_JUNIT_JUNIT_REPORT", # The name of the environment variable
106
+ env_name: "FL_SUPPRESS_TESTS_FROM_JUNIT_JUNIT_REPORT",
115
107
  description: "The junit xml report file from which to collect the tests to suppress",
116
108
  verify_block: proc do |path|
117
109
  UI.user_error!("Error: cannot find the junit xml report file '#{path}'") unless File.exist?(path)
@@ -120,8 +112,8 @@ module Fastlane
120
112
  FastlaneCore::ConfigItem.new(
121
113
  key: :scheme,
122
114
  optional: true,
123
- env_name: "FL_SUPPRESS_TESTS_FROM_JUNIT_SCHEME_TO_UPDATE", # The name of the environment variable
124
- description: "The Xcode scheme where the tests should be suppressed", # a short description of this parameter
115
+ env_name: "FL_SUPPRESS_TESTS_FROM_JUNIT_SCHEME_TO_UPDATE",
116
+ description: "The Xcode scheme where the tests should be suppressed",
125
117
  verify_block: proc do |scheme_name|
126
118
  UI.user_error!("Error: Xcode Scheme '#{scheme_name}' is not valid!") if scheme_name and scheme_name.empty?
127
119
  end
@@ -129,8 +121,8 @@ module Fastlane
129
121
  FastlaneCore::ConfigItem.new(
130
122
  key: :suppress_type,
131
123
  type: Symbol,
132
- env_name: "FL_SUPPRESS_TESTS_FROM_JUNIT_SUPPRESS_TYPE", # The name of the environment variable
133
- description: "Tests to suppress are either :failed or :passing", # a short description of this parameter
124
+ env_name: "FL_SUPPRESS_TESTS_FROM_JUNIT_SUPPRESS_TYPE",
125
+ description: "Tests to suppress are either :failed or :passing",
134
126
  verify_block: proc do |type|
135
127
  UI.user_error!("Error: suppress type ':#{type}' is invalid! Only :failed or :passing are valid types") unless %i[failed passing].include?(type)
136
128
  end
@@ -1,9 +1,5 @@
1
1
  module Fastlane
2
2
  module Actions
3
- module SharedValues
4
- SUPPRESSED_TESTS_CUSTOM_VALUE = :SUPPRESSED_TESTS_CUSTOM_VALUE
5
- end
6
-
7
3
  class SuppressedTestsAction < Action
8
4
  require 'set'
9
5
 
@@ -34,24 +30,15 @@ module Fastlane
34
30
  #####################################################
35
31
 
36
32
  def self.description
37
- "A short description with <= 80 characters of what this action does"
38
- end
39
-
40
- def self.details
41
- # Optional:
42
- # this is your chance to provide a more detailed description of this action
43
- "You can use this action to do cool things..."
33
+ "Retrieves a list of tests that are suppressed in a specific or all Xcode Schemes in a project"
44
34
  end
45
35
 
46
36
  def self.available_options
47
- # Define all options your action supports.
48
-
49
- # Below a few examples
50
37
  [
51
38
  FastlaneCore::ConfigItem.new(
52
39
  key: :xcodeproj,
53
- env_name: "FL_SUPPRESSED_TESTS_XCODE_PROJECT", # The name of the environment variable
54
- description: "The file path to the Xcode project file to read the skipped tests from", # a short description of this parameter
40
+ env_name: "FL_SUPPRESSED_TESTS_XCODE_PROJECT",
41
+ description: "The file path to the Xcode project file to read the skipped tests from",
55
42
  verify_block: proc do |path|
56
43
  UI.user_error!("Error: Xcode project file path not given!") unless path and !path.empty?
57
44
  UI.user_error!("Error: Xcode project '#{path}' not found!") unless Dir.exist?(path)
@@ -60,8 +47,8 @@ module Fastlane
60
47
  FastlaneCore::ConfigItem.new(
61
48
  key: :scheme,
62
49
  optional: true,
63
- env_name: "FL_SUPPRESSED_TESTS_SCHEME_TO_UPDATE", # The name of the environment variable
64
- description: "The Xcode scheme where the suppressed tests may be", # a short description of this parameter
50
+ env_name: "FL_SUPPRESSED_TESTS_SCHEME_TO_UPDATE",
51
+ description: "The Xcode scheme where the suppressed tests may be",
65
52
  verify_block: proc do |scheme_name|
66
53
  UI.user_error!("Error: Xcode Scheme '#{scheme_name}' is not valid!") if scheme_name and scheme_name.empty?
67
54
  end
@@ -69,33 +56,11 @@ module Fastlane
69
56
  ]
70
57
  end
71
58
 
72
- def self.output
73
- # Define the shared values you are going to provide
74
- # Example
75
- [
76
- ['SUPPRESSED_TESTS_CUSTOM_VALUE', 'A description of what this value contains']
77
- ]
78
- end
79
-
80
- def self.return_value
81
- # If your method provides a return value, you can describe here what it does
82
- end
83
-
84
59
  def self.authors
85
- # So no one will ever forget your contribution to fastlane :) You are awesome btw!
86
- ["Your GitHub/Twitter Name"]
60
+ ["lyndsey-ferguson/@ldferguson"]
87
61
  end
88
62
 
89
63
  def self.is_supported?(platform)
90
- # you can do things like
91
- #
92
- # true
93
- #
94
- # platform == :ios
95
- #
96
- # [:ios, :mac].include?(platform)
97
- #
98
-
99
64
  platform == :ios
100
65
  end
101
66
  end
@@ -44,7 +44,7 @@ module Fastlane
44
44
  #####################################################
45
45
 
46
46
  def self.description
47
- "Get the failing and passing tests as reported in a junit xml file"
47
+ "Retrieves the failing and passing tests as reported in a junit xml file"
48
48
  end
49
49
 
50
50
  def self.available_options
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module TestCenter
3
- VERSION = "0.5.0"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  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: 0.5.0
4
+ version: 1.0.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: 2017-11-15 00:00:00.000000000 Z
11
+ date: 2017-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -122,7 +122,13 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
- description:
125
+ description: |2
126
+ This fastlane plugin includes the following actions:
127
+ - multi_scan: uses scan to run Xcode tests a given number of times: only re-testing failing tests
128
+ - suppress_tests_from_junit: uses a junit xml report file to suppress either passing or failing tests in an Xcode Scheme
129
+ - suppress_tests: suppresses specific tests in a specific or all Xcode Schemes in a given project
130
+ - suppressed_tests: retrieves a list of tests that are suppressed in a specific or all Xcode Schemes in a project
131
+ - tests_from_junit: retrieves the failing and passing tests as reported in a junit xml file
126
132
  email: lyndsey.ferguson@appian.com
127
133
  executables: []
128
134
  extensions: []
@@ -135,7 +141,6 @@ files:
135
141
  - lib/fastlane/plugin/test_center/actions/suppress_tests.rb
136
142
  - lib/fastlane/plugin/test_center/actions/suppress_tests_from_junit.rb
137
143
  - lib/fastlane/plugin/test_center/actions/suppressed_tests.rb
138
- - lib/fastlane/plugin/test_center/actions/test_center_action.rb
139
144
  - lib/fastlane/plugin/test_center/actions/tests_from_junit.rb
140
145
  - lib/fastlane/plugin/test_center/helper/test_center_helper.rb
141
146
  - lib/fastlane/plugin/test_center/version.rb
@@ -164,4 +169,3 @@ signing_key:
164
169
  specification_version: 4
165
170
  summary: Makes testing your iOS app easier
166
171
  test_files: []
167
- has_rdoc:
@@ -1,44 +0,0 @@
1
- module Fastlane
2
- module Actions
3
- class TestCenterAction < Action
4
- def self.run(params)
5
- UI.message("The test_center plugin is working!")
6
- end
7
-
8
- def self.description
9
- "Makes testing your iOS app easier"
10
- end
11
-
12
- def self.authors
13
- ["Lyndsey Ferguson"]
14
- end
15
-
16
- def self.return_value
17
- # If your method provides a return value, you can describe here what it does
18
- end
19
-
20
- def self.details
21
- # Optional:
22
- "Makes testing your iOS app easier by providing a list of possible tests, changing what tests are suppressed or not, re-running fragile tests, etc."
23
- end
24
-
25
- def self.available_options
26
- [
27
- # FastlaneCore::ConfigItem.new(key: :your_option,
28
- # env_name: "TEST_CENTER_YOUR_OPTION",
29
- # description: "A description of your option",
30
- # optional: false,
31
- # type: String)
32
- ]
33
- end
34
-
35
- def self.is_supported?(platform)
36
- # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
37
- # See: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
38
- #
39
- # [:ios, :mac, :android].include?(platform)
40
- true
41
- end
42
- end
43
- end
44
- end