fastlane-plugin-test_center 3.8.2 → 3.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fastlane/plugin/test_center/actions/collate_html_reports.rb +3 -3
- data/lib/fastlane/plugin/test_center/actions/collate_junit_reports.rb +20 -19
- data/lib/fastlane/plugin/test_center/actions/multi_scan.rb +1 -1
- data/lib/fastlane/plugin/test_center/helper/junit_helper.rb +6 -6
- data/lib/fastlane/plugin/test_center/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab8e9047e79e8003a28bbf3bbf33459cdef0d6f7181cf44ef96b6e7e20a737be
|
4
|
+
data.tar.gz: bee4f6229d998f9bb5a4e222188c5a90bcbe6393c53fb7f6727b28e5cad1a9fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb04f526bf70711598d88edd5b74938d4f059e9ccc25c0d3d111dd7174df722163d903389e8cf357373b9736b92794549f94bbc13bb6a55be1d725959eec910e
|
7
|
+
data.tar.gz: 37c8f937c76530b5ac3f2e77dce500908e4869df91ce97d34d652aab127e38c756916ad5fea3fcda2f13c2eb90a2fdae69fd1f99f25f6e4bbdecc389fcd2c96f
|
@@ -64,7 +64,7 @@ module Fastlane
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def self.testsuite_from_report(report, testsuite)
|
67
|
-
testsuite_name = testsuite.
|
67
|
+
testsuite_name = testsuite.attribute('id').value
|
68
68
|
REXML::XPath.first(report, "//section[contains(@class, 'test-suite') and @id='#{testsuite_name}']")
|
69
69
|
end
|
70
70
|
|
@@ -117,11 +117,11 @@ module Fastlane
|
|
117
117
|
failing_tests_xpath = "./*[contains(@class, 'tests')]//*[" \
|
118
118
|
"contains(@class, 'failing')]"
|
119
119
|
|
120
|
-
class_attributes = testsuite.
|
120
|
+
class_attributes = testsuite.attribute('class').value
|
121
121
|
test_failures = REXML::XPath.match(testsuite, failing_tests_xpath)
|
122
122
|
test_status = test_failures.size.zero? ? 'passing' : 'failing'
|
123
123
|
|
124
|
-
testsuite.
|
124
|
+
testsuite.add_attribute('class', class_attributes.sub('failing', test_status))
|
125
125
|
end
|
126
126
|
end
|
127
127
|
|
@@ -18,7 +18,7 @@ module Fastlane
|
|
18
18
|
preprocess_testsuites(report)
|
19
19
|
UI.verbose("> collating last report file #{report_filepaths.last}")
|
20
20
|
report.elements.each('//testsuite') do |testsuite|
|
21
|
-
testsuite_name = testsuite.
|
21
|
+
testsuite_name = testsuite.attribute('name').value
|
22
22
|
target_testsuite = REXML::XPath.first(target_report, "//testsuite[@name='#{testsuite_name}']")
|
23
23
|
if target_testsuite
|
24
24
|
UI.verbose(" > collating testsuite #{testsuite_name}")
|
@@ -50,8 +50,8 @@ module Fastlane
|
|
50
50
|
while testcases_with_failures.size > 1
|
51
51
|
target_testcase = testcases_with_failures.shift
|
52
52
|
|
53
|
-
name = target_testcase.
|
54
|
-
classname = target_testcase.
|
53
|
+
name = target_testcase.attribute('name').value
|
54
|
+
classname = target_testcase.attribute('classname').value
|
55
55
|
|
56
56
|
failures = REXML::XPath.match(testsuite, "testcase[@name='#{name}'][@classname='#{classname}']/failure")
|
57
57
|
next unless failures.size > 1
|
@@ -68,7 +68,7 @@ module Fastlane
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def self.flatten_duplicate_testsuites(report, testsuite)
|
71
|
-
testsuite_name = testsuite.
|
71
|
+
testsuite_name = testsuite.attribute('name').value
|
72
72
|
duplicate_testsuites = REXML::XPath.match(report, "//testsuite[@name='#{testsuite_name}']")
|
73
73
|
if duplicate_testsuites.size > 1
|
74
74
|
UI.verbose(" > flattening_duplicate_testsuites")
|
@@ -90,8 +90,8 @@ module Fastlane
|
|
90
90
|
|
91
91
|
def self.collate_testsuite(target_testsuite, other_testsuite)
|
92
92
|
other_testsuite.elements.each('testcase') do |testcase|
|
93
|
-
classname = testcase.
|
94
|
-
name = testcase.
|
93
|
+
classname = testcase.attribute('classname').value
|
94
|
+
name = testcase.attribute('name').value
|
95
95
|
target_testcase = REXML::XPath.first(target_testsuite, "testcase[@name='#{name}' and @classname='#{classname}']")
|
96
96
|
# Replace target_testcase with testcase
|
97
97
|
if target_testcase
|
@@ -110,15 +110,16 @@ module Fastlane
|
|
110
110
|
end
|
111
111
|
|
112
112
|
def self.increment_testable_tries(target_testable, other_testable)
|
113
|
-
try_count = target_testable.attributes['retries'] || 1
|
114
|
-
other_try_count = other_testable['retries'] || 1
|
115
113
|
|
116
|
-
target_testable.
|
114
|
+
try_count = target_testable.attribute('retries')&.value || 1
|
115
|
+
other_try_count = other_testable.attribute('retries')&.value || 1
|
116
|
+
|
117
|
+
target_testable.add_attribute('retries', (try_count.to_i + other_try_count.to_i).to_s)
|
117
118
|
end
|
118
119
|
|
119
120
|
def self.increment_testcase_tries(target_testcase, testcase)
|
120
|
-
try_count = target_testcase.
|
121
|
-
testcase.
|
121
|
+
try_count = target_testcase.attribute('retries')&.value || 0
|
122
|
+
testcase.add_attribute('retries', (try_count.to_i + 1).to_s)
|
122
123
|
end
|
123
124
|
|
124
125
|
def self.update_testable_counts(testable)
|
@@ -126,28 +127,28 @@ module Fastlane
|
|
126
127
|
test_count = 0
|
127
128
|
failure_count = 0
|
128
129
|
testsuites.each do |testsuite|
|
129
|
-
test_count += testsuite.
|
130
|
-
failure_count += testsuite.
|
130
|
+
test_count += testsuite.attribute('tests').value.to_i
|
131
|
+
failure_count += testsuite.attribute('failures').value.to_i
|
131
132
|
end
|
132
|
-
testable.
|
133
|
-
testable.
|
133
|
+
testable.add_attribute('tests', test_count.to_s)
|
134
|
+
testable.add_attribute('failures', failure_count.to_s)
|
134
135
|
end
|
135
136
|
|
136
137
|
def self.update_testsuite_counts(testsuite)
|
137
138
|
testcases = REXML::XPath.match(testsuite, 'testcase')
|
138
|
-
testsuite.
|
139
|
+
testsuite.add_attribute('tests', testcases.size.to_s)
|
139
140
|
failure_count = testcases.reduce(0) do |count, testcase|
|
140
141
|
if REXML::XPath.first(testcase, 'failure')
|
141
142
|
count += 1
|
142
143
|
end
|
143
144
|
count
|
144
145
|
end
|
145
|
-
testsuite.
|
146
|
+
testsuite.add_attribute('failures', failure_count.to_s)
|
146
147
|
end
|
147
148
|
|
148
149
|
def self.attribute_sum_string(node1, node2, attribute)
|
149
|
-
value1 = node1.
|
150
|
-
value2 = node2.
|
150
|
+
value1 = node1.attribute(attribute).value.to_i
|
151
|
+
value2 = node2.attribute(attribute).value.to_i
|
151
152
|
(value1 + value2).to_s
|
152
153
|
end
|
153
154
|
|
@@ -73,7 +73,7 @@ module Fastlane
|
|
73
73
|
failure_details.merge!(junit_results[:failure_details])
|
74
74
|
|
75
75
|
report = REXML::Document.new(File.new(report_file))
|
76
|
-
retry_total_count += (report.root.
|
76
|
+
retry_total_count += (report.root.attribute('retries')&.value || 1).to_i
|
77
77
|
end
|
78
78
|
|
79
79
|
if reportnamer.includes_html?
|
@@ -32,7 +32,7 @@ module TestCenter
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def name
|
35
|
-
return @root.
|
35
|
+
return @root.attribute('name').value
|
36
36
|
end
|
37
37
|
|
38
38
|
def testsuites
|
@@ -50,7 +50,7 @@ module TestCenter
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def name
|
53
|
-
return @root.
|
53
|
+
return @root.attribute('name').value
|
54
54
|
end
|
55
55
|
|
56
56
|
def identifier
|
@@ -74,17 +74,17 @@ module TestCenter
|
|
74
74
|
|
75
75
|
def initialize(xml_element)
|
76
76
|
@root = xml_element
|
77
|
-
name = xml_element.
|
77
|
+
name = xml_element.attribute('name').value
|
78
78
|
failure_element = xml_element.elements['failure']
|
79
79
|
if failure_element
|
80
|
-
@message = failure_element.
|
80
|
+
@message = failure_element.attribute('message')&.value || ''
|
81
81
|
@location = failure_element.text || ''
|
82
82
|
end
|
83
|
-
full_testsuite = xml_element.parent.
|
83
|
+
full_testsuite = xml_element.parent.attribute('name').value
|
84
84
|
testsuite = full_testsuite.testsuite
|
85
85
|
is_swift = full_testsuite.testsuite_swift?
|
86
86
|
|
87
|
-
testable_filename = xml_element.parent.parent.
|
87
|
+
testable_filename = xml_element.parent.parent.attribute('name').value
|
88
88
|
testable = File.basename(testable_filename, '.xctest')
|
89
89
|
@identifier = "#{testable}/#{testsuite}/#{name}"
|
90
90
|
@skipped_test = Xcodeproj::XCScheme::TestAction::TestableReference::SkippedTest.new
|
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.8.
|
4
|
+
version: 3.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lyndsey Ferguson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|