fastlane-plugin-try_scan 0.1.0
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 +7 -0
- data/LICENSE +21 -0
- data/README.md +52 -0
- data/lib/fastlane/plugin/try_scan.rb +16 -0
- data/lib/fastlane/plugin/try_scan/actions/try_scan_action.rb +106 -0
- data/lib/fastlane/plugin/try_scan/helper/scan_helper.rb +105 -0
- data/lib/fastlane/plugin/try_scan/helper/try_scan_runner.rb +145 -0
- data/lib/fastlane/plugin/try_scan/version.rb +5 -0
- metadata +190 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d3bf2f28d3558be4e3d2cd068beb9a4968f1957532a554aa902134c0db1e5e05
|
4
|
+
data.tar.gz: b4f5d09eede219e2425efce5487481947bee2a30075aac8448ba9f014ddbb48e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 575e434210450543a657cdcae55e88573183e552a2e12125d83ac4fc5cbdaa0ef715699268a6b1059a12f23ffb4a6fea47a3093683d95fc61146a6dc359d1b76
|
7
|
+
data.tar.gz: 4670941d32adf903ff77ebf024555c40295ad64b7e267cb027b40def51d45183f4df0e1521778ac623857bb30a180e42990ac04b3aa30343083b3f9910992080
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 Alexey Alter-Pesotskiy <aalterpesotskiy@zendesk.com>
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# try_scan plugin
|
2
|
+
|
3
|
+
[](https://rubygems.org/gems/fastlane-plugin-try_scan)
|
4
|
+
|
5
|
+
## Getting Started
|
6
|
+
|
7
|
+
This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-try_scan`, add it to your project by running:
|
8
|
+
|
9
|
+
```bash
|
10
|
+
fastlane add_plugin try_scan
|
11
|
+
```
|
12
|
+
|
13
|
+
## About try_scan
|
14
|
+
|
15
|
+
Simple way to retry your scan action
|
16
|
+
|
17
|
+
**Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
|
18
|
+
|
19
|
+
## Example
|
20
|
+
|
21
|
+
Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
|
22
|
+
|
23
|
+
**Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
|
24
|
+
|
25
|
+
## Run tests for this plugin
|
26
|
+
|
27
|
+
To run both the tests, and code style validation, run
|
28
|
+
|
29
|
+
```
|
30
|
+
rake
|
31
|
+
```
|
32
|
+
|
33
|
+
To automatically fix many of the styling issues, use
|
34
|
+
```
|
35
|
+
rubocop -a
|
36
|
+
```
|
37
|
+
|
38
|
+
## Issues and Feedback
|
39
|
+
|
40
|
+
For any other issues and feedback about this plugin, please submit it to this repository.
|
41
|
+
|
42
|
+
## Troubleshooting
|
43
|
+
|
44
|
+
If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
|
45
|
+
|
46
|
+
## Using _fastlane_ Plugins
|
47
|
+
|
48
|
+
For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
|
49
|
+
|
50
|
+
## About _fastlane_
|
51
|
+
|
52
|
+
_fastlane_ is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'fastlane/plugin/try_scan/version'
|
2
|
+
|
3
|
+
module Fastlane
|
4
|
+
module TryScan
|
5
|
+
# Return all .rb files inside the "actions" and "helper" directory
|
6
|
+
def self.all_classes
|
7
|
+
Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
# By default we want to import all available actions and helpers
|
13
|
+
# A plugin can contain any number of actions and plugins
|
14
|
+
Fastlane::TryScan.all_classes.each do |current|
|
15
|
+
require current
|
16
|
+
end
|
@@ -0,0 +1,106 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
|
4
|
+
require 'fastlane/actions/scan'
|
5
|
+
require_relative '../helper/scan_helper'
|
6
|
+
require_relative '../helper/try_scan_runner'
|
7
|
+
|
8
|
+
FastlaneScanHelper = TryScanManager::Helper::FastlaneScanHelper
|
9
|
+
|
10
|
+
class TryScanAction < Action
|
11
|
+
def self.run(params)
|
12
|
+
prepare_for_testing(params)
|
13
|
+
success = TryScanManager::Runner.new(params.values).run
|
14
|
+
|
15
|
+
raise FastlaneCore::UI.test_failure!('Tests have failed') if params[:fail_build] && !success
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.prepare_for_testing(params)
|
19
|
+
warn_of_xcode11_result_bundle_incompatability(params)
|
20
|
+
use_scanfile_to_override_settings(params.values)
|
21
|
+
turn_off_concurrent_workers(params.values)
|
22
|
+
prepare_scan_config(params.values)
|
23
|
+
coerce_destination_to_array(params)
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.warn_of_xcode11_result_bundle_incompatability(params)
|
27
|
+
if FastlaneCore::Helper.xcode_at_least?('11.0.0')
|
28
|
+
if params[:result_bundle]
|
29
|
+
FastlaneCore::UI.important('As of Xcode 11, test_result bundles created in the output directory are actually symbolic links to an xcresult bundle')
|
30
|
+
end
|
31
|
+
elsif params[:output_types]&.include?('xcresult')
|
32
|
+
FastlaneCore::UI.important("The 'xcresult' :output_type is only supported for Xcode 11 and greater. You are using #{FastlaneCore::Helper.xcode_version}.")
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.coerce_destination_to_array(params)
|
37
|
+
destination = params[:destination] || Scan.config[:destination] || []
|
38
|
+
unless destination.kind_of?(Array)
|
39
|
+
params[:destination] = Scan.config[:destination] = [destination]
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.turn_off_concurrent_workers(scan_options)
|
44
|
+
if Gem::Version.new(Fastlane::VERSION) >= Gem::Version.new('2.142.0')
|
45
|
+
scan_options.delete(:concurrent_workers) if scan_options[:concurrent_workers].to_i > 0
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def self.use_scanfile_to_override_settings(scan_options)
|
50
|
+
overridden_options = FastlaneScanHelper.options_from_configuration_file(
|
51
|
+
FastlaneScanHelper.scan_options_from_try_scan_options(scan_options)
|
52
|
+
)
|
53
|
+
|
54
|
+
unless overridden_options.empty?
|
55
|
+
FastlaneCore::UI.important("Scanfile found: overriding try_scan options with it's values.")
|
56
|
+
overridden_options.each { |key, val| scan_options[key] = val }
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.prepare_scan_config(scan_options)
|
61
|
+
Scan.config ||= FastlaneCore::Configuration.create(
|
62
|
+
Fastlane::Actions::ScanAction.available_options,
|
63
|
+
FastlaneScanHelper.scan_options_from_try_scan_options(scan_options)
|
64
|
+
)
|
65
|
+
end
|
66
|
+
|
67
|
+
#####################################################
|
68
|
+
# Documentation #
|
69
|
+
#####################################################
|
70
|
+
|
71
|
+
def self.description
|
72
|
+
"Simple way to retry your scan action"
|
73
|
+
end
|
74
|
+
|
75
|
+
def self.authors
|
76
|
+
["Alexey Alter-Pesotskiy"]
|
77
|
+
end
|
78
|
+
|
79
|
+
def self.scan_options
|
80
|
+
ScanAction.available_options.reject { |config| %i[output_types].include?(config.key) }
|
81
|
+
end
|
82
|
+
|
83
|
+
def self.available_options
|
84
|
+
scan_options = ScanAction.available_options.reject { |config| %i[output_types].include?(config.key) }
|
85
|
+
scan_options + [
|
86
|
+
FastlaneCore::ConfigItem.new(
|
87
|
+
key: :try_count,
|
88
|
+
env_name: "FL_TRY_SCAN_TRY_COUNT",
|
89
|
+
description: "The number of times to retry running tests via scan",
|
90
|
+
type: Integer,
|
91
|
+
is_string: false,
|
92
|
+
default_value: 1
|
93
|
+
)
|
94
|
+
]
|
95
|
+
end
|
96
|
+
|
97
|
+
def self.category
|
98
|
+
:testing
|
99
|
+
end
|
100
|
+
|
101
|
+
def self.is_supported?(platform)
|
102
|
+
[:ios].include?(platform)
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
@@ -0,0 +1,105 @@
|
|
1
|
+
module TryScanManager
|
2
|
+
module Helper
|
3
|
+
module FastlaneScanHelper
|
4
|
+
def self.report_options
|
5
|
+
Scan::XCPrettyReporterOptionsGenerator.generate_from_scan_config
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.valid_scan_keys
|
9
|
+
Fastlane::Actions::ScanAction.available_options.map(&:key)
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.print_scan_parameters(params)
|
13
|
+
return if FastlaneCore::Helper.test?
|
14
|
+
|
15
|
+
FastlaneCore::PrintTable.print_values(
|
16
|
+
config: params,
|
17
|
+
title: "Summary for scan #{Fastlane::VERSION}"
|
18
|
+
)
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.scan_options_from_try_scan_options(params)
|
22
|
+
valid_scan_keys = Fastlane::Actions::ScanAction.available_options.map(&:key)
|
23
|
+
params.select { |key, _| valid_scan_keys.include?(key) }
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.options_from_configuration_file(params)
|
27
|
+
config = FastlaneCore::Configuration.create(
|
28
|
+
Fastlane::Actions::ScanAction.available_options,
|
29
|
+
params
|
30
|
+
)
|
31
|
+
config_file = config.load_configuration_file(Scan.scanfile_name, nil, true)
|
32
|
+
overridden_options = config_file ? config_file.options : {}
|
33
|
+
|
34
|
+
FastlaneCore::Project.detect_projects(config)
|
35
|
+
project = FastlaneCore::Project.new(config)
|
36
|
+
|
37
|
+
imported_path = File.expand_path(Scan.scanfile_name)
|
38
|
+
Dir.chdir(File.expand_path("..", project.path)) do
|
39
|
+
if File.expand_path(Scan.scanfile_name) != imported_path
|
40
|
+
config_file = config.load_configuration_file(Scan.scanfile_name, nil, true)
|
41
|
+
end
|
42
|
+
overridden_options.merge!(config_file.options) if config_file
|
43
|
+
end
|
44
|
+
overridden_options
|
45
|
+
end
|
46
|
+
|
47
|
+
def self.remove_preexisting_simulator_logs(params)
|
48
|
+
return unless params[:include_simulator_logs]
|
49
|
+
|
50
|
+
output_directory = report_options.instance_variable_get(:@output_directory)
|
51
|
+
glob_pattern = "#{output_directory}/**/system_logs-*.{log,logarchive}"
|
52
|
+
logs = Dir.glob(glob_pattern)
|
53
|
+
FileUtils.rm_rf(logs)
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.remove_preexisting_test_result_bundles(params)
|
57
|
+
output_directory = report_options.instance_variable_get(:@output_directory)
|
58
|
+
glob_pattern = "#{output_directory}/**/*.test_result"
|
59
|
+
preexisting_test_result_bundles = Dir.glob(glob_pattern)
|
60
|
+
if preexisting_test_result_bundles.size > 0
|
61
|
+
FastlaneCore::UI.verbose("Removing pre-existing test_result bundles: ")
|
62
|
+
preexisting_test_result_bundles.each { |bundle| FastlaneCore::UI.verbose(" #{bundle}") }
|
63
|
+
FileUtils.rm_rf(preexisting_test_result_bundles)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def self.remove_preexisting_xcresult_bundles(params)
|
68
|
+
output_directory = report_options.instance_variable_get(:@output_directory)
|
69
|
+
glob_pattern = "#{output_directory}/**/*.xcresult"
|
70
|
+
preexisting_xcresult_bundles = Dir.glob(glob_pattern)
|
71
|
+
if preexisting_xcresult_bundles.size > 0
|
72
|
+
FastlaneCore::UI.verbose("Removing pre-existing xcresult bundles: ")
|
73
|
+
preexisting_xcresult_bundles.each { |bundle| FastlaneCore::UI.verbose(" #{bundle}") }
|
74
|
+
FileUtils.rm_rf(preexisting_xcresult_bundles)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
def self.remove_report_files
|
79
|
+
output_files = report_options.instance_variable_get(:@output_files)
|
80
|
+
output_directory = report_options.instance_variable_get(:@output_directory)
|
81
|
+
|
82
|
+
unless output_files.empty?
|
83
|
+
FastlaneCore::UI.verbose("Removing report files")
|
84
|
+
output_files.each do |output_file|
|
85
|
+
report_file = File.join(output_directory, output_file)
|
86
|
+
FastlaneCore::UI.verbose(" #{report_file}")
|
87
|
+
FileUtils.rm_f(report_file)
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
def self.update_xctestrun_after_build(scan_options)
|
93
|
+
xctestrun_files = Dir.glob("#{Scan.config[:derived_data_path]}/Build/Products/*.xctestrun")
|
94
|
+
FastlaneCore::UI.verbose("After building, found xctestrun files #{xctestrun_files} (choosing 1st)")
|
95
|
+
scan_options[:xctestrun] = xctestrun_files.first
|
96
|
+
end
|
97
|
+
|
98
|
+
def self.remove_preexisting_xctestrun_files
|
99
|
+
xctestrun_files = Dir.glob("#{Scan.config[:derived_data_path]}/Build/Products/*.xctestrun")
|
100
|
+
FastlaneCore::UI.verbose("Before building, removing pre-existing xctestrun files: #{xctestrun_files}")
|
101
|
+
FileUtils.rm_rf(xctestrun_files)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
@@ -0,0 +1,145 @@
|
|
1
|
+
module TryScanManager
|
2
|
+
class Runner
|
3
|
+
|
4
|
+
FastlaneScanHelper = TryScanManager::Helper::FastlaneScanHelper
|
5
|
+
|
6
|
+
def initialize(options = {})
|
7
|
+
@options = options
|
8
|
+
warn_of_try_scan_option
|
9
|
+
end
|
10
|
+
|
11
|
+
def run
|
12
|
+
update_scan_config
|
13
|
+
print_summary
|
14
|
+
attempt = 1
|
15
|
+
begin
|
16
|
+
warn_of_performing_attempts(attempt)
|
17
|
+
clear_preexisting_data
|
18
|
+
Scan::Runner.new.run
|
19
|
+
return true
|
20
|
+
rescue FastlaneCore::Interface::FastlaneBuildFailure, FastlaneCore::Interface::FastlaneTestFailure => _
|
21
|
+
merge_junit_reports if attempt != 1
|
22
|
+
return false if attempt > @options[:try_count]
|
23
|
+
|
24
|
+
attempt += 1
|
25
|
+
update_scan_options
|
26
|
+
retry
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def update_scan_config
|
31
|
+
Scan.config[:output_types] << 'junit' unless Scan.config[:output_types].include?('junit')
|
32
|
+
end
|
33
|
+
|
34
|
+
def print_summary
|
35
|
+
return if FastlaneCore::Helper.test?
|
36
|
+
|
37
|
+
scan_actual_params = Scan.config.values(ask: false)
|
38
|
+
scan_available_keys = Scan.config.available_options.map(&:key)
|
39
|
+
try_scan_params = @options.reject { |try_scan_key, _| scan_available_keys.include?(try_scan_key) }
|
40
|
+
FastlaneCore::PrintTable.print_values(
|
41
|
+
config: try_scan_params,
|
42
|
+
title: "Summary for try_scan #{Fastlane::TryScan::VERSION}"
|
43
|
+
)
|
44
|
+
FastlaneCore::PrintTable.print_values(
|
45
|
+
config: scan_actual_params,
|
46
|
+
title: "Summary for scan #{Fastlane::VERSION}"
|
47
|
+
)
|
48
|
+
end
|
49
|
+
|
50
|
+
def warn_of_performing_attempts(attempt)
|
51
|
+
FastlaneCore::UI.important("TryScan shot №#{attempt}\n")
|
52
|
+
end
|
53
|
+
|
54
|
+
def warn_of_try_scan_option
|
55
|
+
if @options[:try_count] <= 0
|
56
|
+
FastlaneCore::UI.important(":try_count can't be less than or equal to zero. Setting a default value equal to `1`")
|
57
|
+
@options[:try_count] = 1
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def clear_preexisting_data
|
62
|
+
FastlaneScanHelper.remove_preexisting_simulator_logs(@options)
|
63
|
+
FastlaneScanHelper.remove_preexisting_test_result_bundles(@options)
|
64
|
+
FastlaneScanHelper.remove_preexisting_xcresult_bundles(@options)
|
65
|
+
FastlaneScanHelper.remove_report_files
|
66
|
+
end
|
67
|
+
|
68
|
+
def update_scan_options
|
69
|
+
scan_options = @options.select { |key, _| FastlaneScanHelper.valid_scan_keys.include?(key) }.merge(plugin_scan_options)
|
70
|
+
scan_options[:only_testing] = extract_failed_tests
|
71
|
+
scan_options[:skip_build] = true
|
72
|
+
scan_options[:test_without_building] = true
|
73
|
+
scan_options[:build_for_testing] = false
|
74
|
+
scan_options.delete(:skip_testing)
|
75
|
+
Scan.cache.clear
|
76
|
+
scan_options.each do |key, val|
|
77
|
+
next if val.nil?
|
78
|
+
|
79
|
+
Scan.config.set(key, val) unless val.nil?
|
80
|
+
FastlaneCore::UI.verbose("\tSetting #{key.to_s} to #{val}")
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
def plugin_scan_options
|
85
|
+
xcargs = @options[:xcargs] || ''
|
86
|
+
if xcargs&.include?('build-for-testing')
|
87
|
+
FastlaneCore::UI.important(":xcargs, #{xcargs}, contained 'build-for-testing', removing it")
|
88
|
+
xcargs.slice!('build-for-testing')
|
89
|
+
end
|
90
|
+
if xcargs.include?('-quiet')
|
91
|
+
FastlaneCore::UI.important('Disabling -quiet as failing tests cannot be found with it enabled.')
|
92
|
+
xcargs.gsub!('-quiet', '')
|
93
|
+
end
|
94
|
+
xcargs.gsub!(/-parallel-testing-enabled(=|\s+)(YES|NO)/, '')
|
95
|
+
@options.select { |k,v| FastlaneScanHelper.valid_scan_keys.include?(k) }.merge({ xcargs: "#{xcargs} -parallel-testing-enabled NO " })
|
96
|
+
end
|
97
|
+
|
98
|
+
def extract_failed_tests
|
99
|
+
report = junit_report
|
100
|
+
suite_name = report.xpath('testsuites/@name').to_s.split('.')[0]
|
101
|
+
test_cases = report.xpath('//testcase')
|
102
|
+
only_testing = []
|
103
|
+
test_cases.each do |test_case|
|
104
|
+
next if test_case.xpath('failure').empty?
|
105
|
+
|
106
|
+
test_class = test_case.xpath('@classname').to_s.split('.')[1]
|
107
|
+
test_name = test_case.xpath('@name')
|
108
|
+
only_testing << "#{suite_name}/#{test_class}/#{test_name}"
|
109
|
+
end
|
110
|
+
only_testing
|
111
|
+
end
|
112
|
+
|
113
|
+
def junit_report(cached: false)
|
114
|
+
unless cached
|
115
|
+
report_options = FastlaneScanHelper.report_options
|
116
|
+
output_files = report_options.instance_variable_get(:@output_files)
|
117
|
+
output_directory = report_options.instance_variable_get(:@output_directory)
|
118
|
+
file_name = output_files.select { |name| name.include?('.xml') }.first
|
119
|
+
@junit_report_path = "#{output_directory}/#{file_name}"
|
120
|
+
@cached_junit_report = File.open(@junit_report_path) { |f| Nokogiri::XML(f) }
|
121
|
+
end
|
122
|
+
@cached_junit_report
|
123
|
+
end
|
124
|
+
|
125
|
+
def merge_junit_reports
|
126
|
+
old_junit_report = junit_report(cached: true)
|
127
|
+
new_junit_report = junit_report(cached: false)
|
128
|
+
|
129
|
+
new_junit_report.css("testsuites").zip(old_junit_report.css("testsuites")).each do |new_suites, old_suites|
|
130
|
+
old_suites.attributes["failures"].value = new_suites.attributes["failures"].value
|
131
|
+
new_suites.css("testsuite").zip(old_suites.css("testsuite")).each do |new_suite, old_suite|
|
132
|
+
old_suite.attributes["failures"].value = new_suite.attributes["failures"].value
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
new_junit_report.css('testcase').each do |node1|
|
137
|
+
old_junit_report.css('testcase').each do |node2|
|
138
|
+
node2.children = node1.children if node1['name'] == node2['name']
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
File.open(@junit_report_path, "w+") { |f| f.write(old_junit_report.to_xml) }
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
metadata
ADDED
@@ -0,0 +1,190 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fastlane-plugin-try_scan
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Alexey Alter-Pesotskiy
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-06-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: pry
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec_junit_formatter
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.49.1
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.49.1
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop-require_tools
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: simplecov
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: nokogiri
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: fastlane
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 2.144.0
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 2.144.0
|
153
|
+
description:
|
154
|
+
email: 33gri@bk.ru
|
155
|
+
executables: []
|
156
|
+
extensions: []
|
157
|
+
extra_rdoc_files: []
|
158
|
+
files:
|
159
|
+
- LICENSE
|
160
|
+
- README.md
|
161
|
+
- lib/fastlane/plugin/try_scan.rb
|
162
|
+
- lib/fastlane/plugin/try_scan/actions/try_scan_action.rb
|
163
|
+
- lib/fastlane/plugin/try_scan/helper/scan_helper.rb
|
164
|
+
- lib/fastlane/plugin/try_scan/helper/try_scan_runner.rb
|
165
|
+
- lib/fastlane/plugin/try_scan/version.rb
|
166
|
+
homepage: https://github.com/alteral/fastlane-plugin-try_scan
|
167
|
+
licenses:
|
168
|
+
- MIT
|
169
|
+
metadata:
|
170
|
+
allowed_push_host: https://rubygems.org
|
171
|
+
post_install_message:
|
172
|
+
rdoc_options: []
|
173
|
+
require_paths:
|
174
|
+
- lib
|
175
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - ">="
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '0'
|
180
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
181
|
+
requirements:
|
182
|
+
- - ">="
|
183
|
+
- !ruby/object:Gem::Version
|
184
|
+
version: '0'
|
185
|
+
requirements: []
|
186
|
+
rubygems_version: 3.0.3
|
187
|
+
signing_key:
|
188
|
+
specification_version: 4
|
189
|
+
summary: Simple way to retry your scan action
|
190
|
+
test_files: []
|