fastlane-plugin-xcresult_to_junit 0.4.0 → 0.4.3
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3e3c80ce10c32abd6b9ccb28cdaeb5a36cd3f521e3744b4f578523800d2ea79
|
4
|
+
data.tar.gz: b14e9c4e46bcfea6b535558650fb94d10f356574da0f693e16dd2ed05c1d2143
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ace6f018fd0942119a4a7c1cfd3e6b8afebfb25ead7644ef91841a520892e896f8e4c23216f68020325afd6b11aa5f9929f98d99d097aef71154eb7eee9a0c3e
|
7
|
+
data.tar.gz: 40ec61f25ef1adf0ca0f870e4f39ed3968d2800236864451f4a212674c4bd88a72313dd29d8f7ae6d443f4b776dbdc7a1a9c6c31b19c5518117aeb49c97b2568
|
@@ -36,9 +36,18 @@ module Fastlane
|
|
36
36
|
passed += 1
|
37
37
|
elsif test_case['result'] == 'Failed'
|
38
38
|
failed += 1
|
39
|
+
testcase[:failure] ||= []
|
40
|
+
testcase[:failure_location] ||= []
|
39
41
|
test_case['children'].each do |failure|
|
40
|
-
|
41
|
-
|
42
|
+
if failure['nodeType'] == 'Repetition'
|
43
|
+
failure['children'].each do |retry_failure|
|
44
|
+
testcase[:failure] << retry_failure['name']
|
45
|
+
testcase[:failure_location] << failure['name']
|
46
|
+
end
|
47
|
+
elsif failure['nodeType'] == 'Failure Message'
|
48
|
+
testcase[:failure] << failure['name']
|
49
|
+
testcase[:failure_location] << failure['name'].split(': ')[0]
|
50
|
+
end
|
42
51
|
end
|
43
52
|
end
|
44
53
|
test_cases << testcase
|
@@ -60,12 +69,13 @@ module Fastlane
|
|
60
69
|
test_identifier = test_attachment['testIdentifier']
|
61
70
|
folder_name = test_identifier.sub('()', '').sub('/', '.')
|
62
71
|
|
63
|
-
test_attachment['attachments'].each do |attachment|
|
72
|
+
test_attachment['attachments'].reverse().each do |attachment|
|
64
73
|
name = attachment['suggestedHumanReadableName']
|
65
74
|
filename = attachment['exportedFileName']
|
66
75
|
mime_type = 'image/png'
|
67
76
|
mime_type = 'text/plain' if filename.end_with?('.txt')
|
68
77
|
timestamp = attachment['timestamp']
|
78
|
+
map[folder_name] ||= { 'files' => [] }
|
69
79
|
map[folder_name]['files'].push({ 'description' => name, 'mime-type' => mime_type, 'path' => filename,
|
70
80
|
'timestamp' => timestamp })
|
71
81
|
end
|
@@ -79,7 +79,14 @@ module Fastlane
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def self.junit_testcase_failure(testcase)
|
82
|
-
|
82
|
+
if testcase[:failure].length != testcase[:failure_location].length
|
83
|
+
raise "Mismatch in lengths: testcase[:failure] and testcase[:failure_location] must have the same length."
|
84
|
+
end
|
85
|
+
for index in 0...testcase[:failure].length
|
86
|
+
failure = testcase[:failure][index]
|
87
|
+
failure_location = testcase[:failure_location][index]
|
88
|
+
puts("<failure message=#{failure.encode(xml: :attr)}>#{failure_location.encode(xml: :text)}</failure>")
|
89
|
+
end
|
83
90
|
end
|
84
91
|
|
85
92
|
def self.junit_testcase_error(testcase)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-xcresult_to_junit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane Birdsall
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|