fastlane-plugin-test_center 3.5.9 → 3.5.10
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2f64dd90cd40d23bc5af62990c5a3cec86d729c
|
4
|
+
data.tar.gz: 9972b63261d62a37533ab8448ec97853faeca89f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c585ac7539733cecf79d16bc09abbc31169e08a31464ddc3d00c663654d261f4dde76c24fd15ec273e65b2874f027fe6d073683299fa9260d04f5855087d10da
|
7
|
+
data.tar.gz: e291cd3e9d74dccdec5f9eb6f01074b3bee7b015cbffcec5b25eabcba3e99fda5f344c4bb44bbf18b4a21900a048e193cb4217ac6bfc9843a1f95313c667e6a4
|
@@ -6,26 +6,29 @@ module Fastlane
|
|
6
6
|
if report_filepaths.size == 1
|
7
7
|
FileUtils.cp(report_filepaths[0], params[:collated_report])
|
8
8
|
else
|
9
|
+
UI.verbose("collate_junit_reports with #{report_filepaths}")
|
9
10
|
reports = report_filepaths.map { |report_filepath| REXML::Document.new(File.new(report_filepath)) }
|
10
11
|
|
11
12
|
# copy any missing testsuites
|
12
13
|
target_report = reports.shift
|
13
|
-
|
14
|
+
preprocess_testsuites(target_report)
|
14
15
|
|
15
16
|
reports.each do |report|
|
16
|
-
|
17
|
-
|
17
|
+
preprocess_testsuites(report)
|
18
|
+
UI.verbose("> collating last report file #{report_filepaths.last}")
|
18
19
|
report.elements.each('//testsuite') do |testsuite|
|
19
20
|
testsuite_name = testsuite.attributes['name']
|
20
|
-
|
21
21
|
target_testsuite = REXML::XPath.first(target_report, "//testsuite[@name='#{testsuite_name}']")
|
22
22
|
if target_testsuite
|
23
|
+
UI.verbose(" > collating testsuite #{testsuite_name}")
|
23
24
|
collate_testsuite(target_testsuite, testsuite)
|
25
|
+
UI.verbose(" < collating testsuite #{testsuite_name}")
|
24
26
|
else
|
25
27
|
testable = REXML::XPath.first(target_report, "//testsuites")
|
26
28
|
testable << testsuite
|
27
29
|
end
|
28
30
|
end
|
31
|
+
UI.verbose("< collating last report file #{report_filepaths.last}")
|
29
32
|
end
|
30
33
|
target_report.elements.each('//testsuite') do |testsuite|
|
31
34
|
update_testsuite_counts(testsuite)
|
@@ -40,18 +43,47 @@ module Fastlane
|
|
40
43
|
end
|
41
44
|
end
|
42
45
|
|
43
|
-
def self.
|
44
|
-
|
45
|
-
testsuite_name = testsuite.attributes['name']
|
46
|
+
def self.collapse_testcase_multiple_failures_in_testsuite(testsuite)
|
47
|
+
testcases_with_failures = REXML::XPath.match(testsuite, 'testcase[failure]')
|
46
48
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
49
|
+
while testcases_with_failures.size > 1
|
50
|
+
target_testcase = testcases_with_failures.shift
|
51
|
+
|
52
|
+
name = target_testcase.attributes['name']
|
53
|
+
classname = target_testcase.attributes['classname']
|
54
|
+
|
55
|
+
failures = REXML::XPath.match(testsuite, "testcase[@name='#{name}'][@classname='#{classname}']/failure")
|
56
|
+
next unless failures.size > 1
|
57
|
+
|
58
|
+
failures[1..-1].each do |failure|
|
59
|
+
failure_clone = failure.clone
|
60
|
+
failure_clone.text = failure.text
|
61
|
+
target_testcase << failure_clone
|
62
|
+
|
63
|
+
testsuite.delete_element(failure.parent)
|
64
|
+
testcases_with_failures.delete(failure.parent)
|
53
65
|
end
|
54
|
-
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
def self.flatten_duplicate_testsuites(report, testsuite)
|
70
|
+
testsuite_name = testsuite.attributes['name']
|
71
|
+
duplicate_testsuites = REXML::XPath.match(report, "//testsuite[@name='#{testsuite_name}']")
|
72
|
+
if duplicate_testsuites.size > 1
|
73
|
+
UI.verbose(" > flattening_duplicate_testsuites")
|
74
|
+
duplicate_testsuites.drop(1).each do |duplicate_testsuite|
|
75
|
+
collate_testsuite(testsuite, duplicate_testsuite)
|
76
|
+
duplicate_testsuite.parent.delete_element(duplicate_testsuite)
|
77
|
+
end
|
78
|
+
UI.verbose(" < flattening_duplicate_testsuites")
|
79
|
+
end
|
80
|
+
update_testsuite_counts(testsuite)
|
81
|
+
end
|
82
|
+
|
83
|
+
def self.preprocess_testsuites(report)
|
84
|
+
report.elements.each('//testsuite') do |testsuite|
|
85
|
+
flatten_duplicate_testsuites(report, testsuite)
|
86
|
+
collapse_testcase_multiple_failures_in_testsuite(testsuite)
|
55
87
|
end
|
56
88
|
end
|
57
89
|
|
@@ -61,9 +93,14 @@ module Fastlane
|
|
61
93
|
name = testcase.attributes['name']
|
62
94
|
target_testcase = REXML::XPath.first(target_testsuite, "testcase[@name='#{name}' and @classname='#{classname}']")
|
63
95
|
# Replace target_testcase with testcase
|
64
|
-
if target_testcase
|
65
|
-
|
66
|
-
|
96
|
+
if target_testcase
|
97
|
+
UI.verbose(" collate_testsuite with testcase #{name}")
|
98
|
+
UI.verbose(" replacing \"#{target_testcase}\" with \"#{testcase}\"")
|
99
|
+
parent = target_testcase.parent
|
100
|
+
parent.insert_after(target_testcase, testcase)
|
101
|
+
parent.delete_element(target_testcase)
|
102
|
+
UI.verbose("")
|
103
|
+
UI.verbose(" target_testcase after replacement \"#{parent}\"")
|
67
104
|
else
|
68
105
|
target_testsuite << testcase
|
69
106
|
end
|
@@ -21,9 +21,6 @@ module Fastlane
|
|
21
21
|
end
|
22
22
|
smart_scanner = ::TestCenter::Helper::CorrectingScanHelper.new(params.values)
|
23
23
|
tests_passed = smart_scanner.scan
|
24
|
-
if params[:fail_build] && !tests_passed
|
25
|
-
raise UI.test_failure!('Tests have failed')
|
26
|
-
end
|
27
24
|
summary = run_summary(params, tests_passed, smart_scanner.retry_total_count)
|
28
25
|
unless Helper.test?
|
29
26
|
FastlaneCore::PrintTable.print_values(
|
@@ -31,6 +28,9 @@ module Fastlane
|
|
31
28
|
title: "multi_scan results"
|
32
29
|
)
|
33
30
|
end
|
31
|
+
if params[:fail_build] && !tests_passed
|
32
|
+
raise UI.test_failure!('Tests have failed')
|
33
|
+
end
|
34
34
|
summary
|
35
35
|
end
|
36
36
|
|
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.5.
|
4
|
+
version: 3.5.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lyndsey Ferguson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|