fastlane-plugin-test_center 3.14.7 → 3.14.8

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: 83032c7ae1a7fd821330d9729adcc3a6adc82a3767f7e1aa04327227bf1dfcb0
4
- data.tar.gz: 44fe3edc2e95fdcf129b6031e4e01e586c7acecba69b99e47a9d4034fff57878
3
+ metadata.gz: 290ab3e6fb5932555e74d834784e80cb441dc4b7e4feb49eda479382a603a1e5
4
+ data.tar.gz: f46250359e1d156d283dd033e6e8db8c851297ea7a6385d78da4e72a014d0ebd
5
5
  SHA512:
6
- metadata.gz: 2a50e19f593fb782828cd14ca45468f5841b1b20781701c0982c644a4cb88d9261f83ccf75eb900c562c4611baca19691e7f5d9094bb909fba11512eb0e813b1
7
- data.tar.gz: 56bb12fd6b0ed79041d98d97977b5946fd83d6a05b7f623dbb1ac6145ebf4f8da852f2f69a0766aeb11b617ad7b01c62f404d63b378e7656f5589db8d59813c0
6
+ metadata.gz: aaf987944f48d6511755077c7e4e1c564f722ad8c7f69f8c4e0f24b7c5db62590edc9fc69372e98d19e0cc8b7466f8b3fd2ef2a1ddba472b37bc45c3ee0b12a5
7
+ data.tar.gz: e1eb52e0b8b396019fe9727af6895948ad675c574b80293c866dfd627752d0e2dc3c8dd11b3e8f7508a40f1f64732a4b2987b1f92938aa6cf21b98d9c0d731d7
@@ -8,7 +8,7 @@ module Fastlane
8
8
  if report_filepaths.size == 1
9
9
  FileUtils.cp(report_filepaths[0], params[:collated_report])
10
10
  else
11
- UI.verbose("collate_junit_reports with #{report_filepaths}")
11
+ verbose("collate_junit_reports with #{report_filepaths}")
12
12
  reports = report_filepaths.map { |report_filepath| REXML::Document.new(File.new(report_filepath)) }
13
13
  packages = reports.map { |r| r.root.attribute('name').value }.uniq
14
14
  combine_multiple_targets = packages.size > 1
@@ -23,7 +23,7 @@ module Fastlane
23
23
  increment_testable_tries(target_report.root, report.root)
24
24
  package = report.root.attribute('name').value
25
25
  preprocess_testsuites(report, package, combine_multiple_targets)
26
- UI.verbose("> collating last report file #{report_filepaths.last}")
26
+ verbose("> collating last report file #{report_filepaths.last}")
27
27
  report.elements.each('//testsuite') do |testsuite|
28
28
  testsuite_name = testsuite.attribute('name').value
29
29
  package_attribute = ''
@@ -32,15 +32,15 @@ module Fastlane
32
32
  end
33
33
  target_testsuite = REXML::XPath.first(target_report, "//testsuite[@name='#{testsuite_name}' #{package_attribute}]")
34
34
  if target_testsuite
35
- UI.verbose(" > collating testsuite #{testsuite_name}")
35
+ verbose(" > collating testsuite #{testsuite_name}")
36
36
  collate_testsuite(target_testsuite, testsuite)
37
- UI.verbose(" < collating testsuite #{testsuite_name}")
37
+ verbose(" < collating testsuite #{testsuite_name}")
38
38
  else
39
39
  testable = REXML::XPath.first(target_report, "//testsuites")
40
40
  testable << testsuite
41
41
  end
42
42
  end
43
- UI.verbose("< collating last report file #{report_filepaths.last}")
43
+ verbose("< collating last report file #{report_filepaths.last}")
44
44
  end
45
45
  target_report.elements.each('//testsuite') do |testsuite|
46
46
  update_testsuite_counts(testsuite)
@@ -83,12 +83,12 @@ module Fastlane
83
83
  testsuite_name = testsuite.attribute('name').value
84
84
  duplicate_testsuites = REXML::XPath.match(report, "//testsuite[@name='#{testsuite_name}']")
85
85
  if duplicate_testsuites.size > 1
86
- UI.verbose(" > flattening_duplicate_testsuites")
86
+ verbose(" > flattening_duplicate_testsuites")
87
87
  duplicate_testsuites.drop(1).each do |duplicate_testsuite|
88
88
  collate_testsuite(testsuite, duplicate_testsuite)
89
89
  duplicate_testsuite.parent.delete_element(duplicate_testsuite)
90
90
  end
91
- UI.verbose(" < flattening_duplicate_testsuites")
91
+ verbose(" < flattening_duplicate_testsuites")
92
92
  end
93
93
  update_testsuite_counts(testsuite)
94
94
  end
@@ -108,14 +108,14 @@ module Fastlane
108
108
  target_testcase = REXML::XPath.first(target_testsuite, "testcase[@name='#{name}' and @classname='#{classname}']")
109
109
  # Replace target_testcase with testcase
110
110
  if target_testcase
111
- UI.verbose(" collate_testsuite with testcase #{name}")
112
- UI.verbose(" replacing \"#{target_testcase}\" with \"#{testcase}\"")
111
+ verbose(" collate_testsuite with testcase #{name}")
112
+ verbose(" replacing \"#{target_testcase}\" with \"#{testcase}\"")
113
113
  parent = target_testcase.parent
114
114
  increment_testcase_tries(target_testcase, testcase) unless testcase.root == target_testcase.root
115
115
  parent.insert_after(target_testcase, testcase)
116
116
  parent.delete_element(target_testcase)
117
- UI.verbose("")
118
- UI.verbose(" target_testcase after replacement \"#{parent}\"")
117
+ verbose("")
118
+ verbose(" target_testcase after replacement \"#{parent}\"")
119
119
  else
120
120
  target_testsuite << testcase
121
121
  end
@@ -165,6 +165,12 @@ module Fastlane
165
165
  (value1 + value2).to_s
166
166
  end
167
167
 
168
+ def self.verbose(message)
169
+ return if ENV.fetch('COLLATE_JUNIT_REPORTS_VERBOSITY', 1).to_i.zero?
170
+
171
+ UI.verbose(message)
172
+ end
173
+
168
174
  #####################################################
169
175
  # @!group Documentation
170
176
  #####################################################
@@ -1,6 +1,13 @@
1
1
  module TestCenter
2
2
  module Helper
3
3
  module HtmlTestReport
4
+
5
+ def self.verbose(message)
6
+ return if ENV.fetch('COLLATE_HTML_REPORTS_VERBOSITY', 1).to_i.zero?
7
+
8
+ FastlaneCore::UI.verbose(message)
9
+ end
10
+
4
11
  class Report
5
12
  require 'rexml/formatters/transitive'
6
13
 
@@ -24,16 +31,16 @@ module TestCenter
24
31
  def collate_report(report)
25
32
  testsuites.each(&:remove_duplicate_testcases)
26
33
  report.testsuites.each(&:remove_duplicate_testcases)
27
- FastlaneCore::UI.verbose("TestCenter::Helper::HtmlTestReport::Report.collate_report to report:\n\t#{@root}")
34
+ HtmlTestReport.verbose("TestCenter::Helper::HtmlTestReport::Report.collate_report to report:\n\t#{@root}")
28
35
  report.testsuites.each do |given_testsuite|
29
36
  existing_testsuite = testsuite_with_title(given_testsuite.title)
30
37
  if existing_testsuite.nil?
31
- FastlaneCore::UI.verbose("\tadding testsuite\n\t\t#{given_testsuite}")
38
+ HtmlTestReport.verbose("\tadding testsuite\n\t\t#{given_testsuite}")
32
39
  add_testsuite(given_testsuite)
33
40
  else
34
- FastlaneCore::UI.verbose("\tcollating testsuite\n\t\t#{given_testsuite.root}")
41
+ HtmlTestReport.verbose("\tcollating testsuite\n\t\t#{given_testsuite.root}")
35
42
  existing_testsuite.collate_testsuite(given_testsuite)
36
- FastlaneCore::UI.verbose("\tafter collation exiting testsuite\n\t\t#{existing_testsuite.root}")
43
+ HtmlTestReport.verbose("\tafter collation exiting testsuite\n\t\t#{existing_testsuite.root}")
37
44
  end
38
45
  end
39
46
  update_test_count
@@ -210,15 +217,15 @@ module TestCenter
210
217
  given_testcases.each do |given_testcase|
211
218
  existing_testcase = testcase_with_title(given_testcase.title)
212
219
  if existing_testcase.nil?
213
- FastlaneCore::UI.verbose("\t\tadding testcase\n\t\t\t#{given_testcase.root}")
220
+ HtmlTestReport.verbose("\t\tadding testcase\n\t\t\t#{given_testcase.root}")
214
221
  unless given_testcase.passing?
215
- FastlaneCore::UI.verbose("\t\t\twith failure:\n\t\t\t\t#{given_testcase.failure_details}")
222
+ HtmlTestReport.verbose("\t\t\twith failure:\n\t\t\t\t#{given_testcase.failure_details}")
216
223
  end
217
224
  add_testcase(given_testcase)
218
225
  else
219
- FastlaneCore::UI.verbose("\t\tupdating testcase\n\t\t\t#{existing_testcase.root}")
226
+ HtmlTestReport.verbose("\t\tupdating testcase\n\t\t\t#{existing_testcase.root}")
220
227
  unless given_testcase.passing?
221
- FastlaneCore::UI.verbose("\t\t\twith failure:\n\t\t\t\t#{given_testcase.failure_details}")
228
+ HtmlTestReport.verbose("\t\t\twith failure:\n\t\t\t\t#{given_testcase.failure_details}")
222
229
  end
223
230
  existing_testcase.update_testcase(given_testcase)
224
231
  end
@@ -275,7 +282,7 @@ module TestCenter
275
282
  color = row_color
276
283
  failure = failure_details
277
284
  if failure.nil? && !passing?
278
- FastlaneCore::UI.error("\t\t\t\tupdating failing test case that does not have failure_details")
285
+ HtmlTestReport.error("\t\t\t\tupdating failing test case that does not have failure_details")
279
286
  end
280
287
  parent = @root.parent
281
288
 
@@ -283,7 +290,7 @@ module TestCenter
283
290
 
284
291
  new_failure = testcase.failure_details
285
292
  if new_failure && testcase.passing?
286
- FastlaneCore::UI.error("\t\t\t\tswapping passing failing test case that _does_have_ failure_details")
293
+ HtmlTestReport.error("\t\t\t\tswapping passing failing test case that _does_have_ failure_details")
287
294
  end
288
295
 
289
296
  parent.replace_child(@root, testcase.root)
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module TestCenter
3
- VERSION = "3.14.7"
3
+ VERSION = "3.14.8"
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: 3.14.7
4
+ version: 3.14.8
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-10-23 00:00:00.000000000 Z
11
+ date: 2020-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json