fastlane-plugin-xcresult_to_junit 0.4.3 → 0.4.4
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: e56ddaa027a106f5eef88030a4d42eb1c4efccb02edffe8703bb8a26f29075d0
|
4
|
+
data.tar.gz: 0e908487046ad6efacf372577118972946111af7a66f8992dc08e8be216602d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ebe78e460e3be0eccb90d8b5a5827003f7c0270670faae6d51002974d3c4511876b42bc089077d119f1c1da251d568bafd043b32a1d2d95242920c4d32ea764
|
7
|
+
data.tar.gz: 8b795cfbd057468cc63818fce333b7516e7fab91affbbb8080adfeefc31158db4fa84137c11d8b5764ac27a4e17adcac05f7454abb69c145be4e49b4823ae0ac
|
@@ -13,75 +13,78 @@ module Fastlane
|
|
13
13
|
|
14
14
|
devices = result['devices']
|
15
15
|
test_plans = result['testNodes']
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
16
|
+
|
17
|
+
devices.each do |device|
|
18
|
+
map = {}
|
19
|
+
junit_folder = Helper::XcresultToJunitHelper.save_device_details_to_file(params[:output_path], [device])
|
20
|
+
test_suites = []
|
21
|
+
|
22
|
+
test_plans.each do |test_plan|
|
23
|
+
test_plan['children'].each do |test_bundle|
|
24
|
+
test_bundle['children'].each do |test_suite|
|
25
|
+
suite_name = test_suite['name']
|
26
|
+
count = 0
|
27
|
+
passed = 0
|
28
|
+
failed = 0
|
29
|
+
test_cases = []
|
30
|
+
test_suite['children'].each do |test_case|
|
31
|
+
duration = 0.0
|
32
|
+
duration = test_case['duration'].sub('s', '').to_f if test_case['duration']
|
33
|
+
full_testcase_name = test_case['name'].sub('()', '')
|
34
|
+
tags = full_testcase_name.split('_')[1..]
|
35
|
+
testcase = { name: full_testcase_name, time: duration }
|
36
|
+
count += 1
|
37
|
+
if test_case['result'] == 'Passed'
|
38
|
+
passed += 1
|
39
|
+
elsif test_case['result'] == 'Failed'
|
40
|
+
failed += 1
|
41
|
+
testcase[:failure] ||= []
|
42
|
+
testcase[:failure_location] ||= []
|
43
|
+
test_case['children'].each do |failure|
|
44
|
+
if failure['nodeType'] == 'Repetition'
|
45
|
+
failure['children'].each do |retry_failure|
|
46
|
+
testcase[:failure] << retry_failure['name']
|
47
|
+
testcase[:failure_location] << failure['name']
|
48
|
+
end
|
49
|
+
elsif failure['nodeType'] == 'Failure Message'
|
50
|
+
testcase[:failure] << failure['name']
|
51
|
+
testcase[:failure_location] << failure['name'].split(': ')[0]
|
46
52
|
end
|
47
|
-
elsif failure['nodeType'] == 'Failure Message'
|
48
|
-
testcase[:failure] << failure['name']
|
49
|
-
testcase[:failure_location] << failure['name'].split(': ')[0]
|
50
53
|
end
|
51
54
|
end
|
55
|
+
test_cases << testcase
|
56
|
+
map["#{suite_name}.#{full_testcase_name}"] = { 'files' => [], 'tags' => tags }
|
52
57
|
end
|
53
|
-
test_cases
|
54
|
-
|
58
|
+
suite = { name: suite_name.to_s, count: count, failures: failed, errors: 0, cases: test_cases }
|
59
|
+
test_suites << suite
|
55
60
|
end
|
56
|
-
suite = { name: suite_name.to_s, count: count, failures: failed, errors: 0, cases: test_cases }
|
57
|
-
test_suites << suite
|
58
61
|
end
|
59
62
|
end
|
60
|
-
end
|
61
63
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
64
|
+
Helper::XcresultToJunitHelper.generate_junit(junit_folder, test_suites)
|
65
|
+
attachments_folder = "#{junit_folder}/attachments"
|
66
|
+
Helper::XcresultToJunitHelper.save_attachments(params[:xcresult_path], attachments_folder)
|
67
|
+
|
68
|
+
test_attachments = Helper::XcresultToJunitHelper.fetch_attachment_manifest(attachments_folder)
|
69
|
+
|
70
|
+
test_attachments.each do |test_attachment|
|
71
|
+
test_identifier = test_attachment['testIdentifier']
|
72
|
+
folder_name = test_identifier.sub('()', '').sub('/', '.')
|
73
|
+
|
74
|
+
test_attachment['attachments'].reverse().each do |attachment|
|
75
|
+
name = attachment['suggestedHumanReadableName']
|
76
|
+
filename = attachment['exportedFileName']
|
77
|
+
mime_type = 'image/png'
|
78
|
+
mime_type = 'text/plain' if filename.end_with?('.txt')
|
79
|
+
timestamp = attachment['timestamp']
|
80
|
+
map[folder_name] ||= { 'files' => [] }
|
81
|
+
map[folder_name]['files'].push({ 'description' => name, 'mime-type' => mime_type, 'path' => filename,
|
82
|
+
'timestamp' => timestamp })
|
83
|
+
end
|
81
84
|
end
|
82
|
-
end
|
83
85
|
|
84
|
-
|
86
|
+
Helper::XcresultToJunitHelper.save_screenshot_mapping(map, attachments_folder)
|
87
|
+
end
|
85
88
|
UI.message('The xcresult_to_junit plugin has finished!')
|
86
89
|
end
|
87
90
|
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane Birdsall
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -123,7 +123,7 @@ dependencies:
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
description:
|
126
|
-
email:
|
126
|
+
email: zanizrules@gmail.com
|
127
127
|
executables: []
|
128
128
|
extensions: []
|
129
129
|
extra_rdoc_files: []
|