class TestCenter::Helper::MultiScanManager::RetryingScan

Public Class Methods

new(options = {}) click to toggle source
# File lib/fastlane/plugin/test_center/helper/multi_scan_manager/retrying_scan.rb, line 5
def initialize(options = {})
  @options = options
  @retrying_scan_helper = RetryingScanHelper.new(@options)
end
run(options) click to toggle source

:nocov:

# File lib/fastlane/plugin/test_center/helper/multi_scan_manager/retrying_scan.rb, line 11
def self.run(options)
  RetryingScan.new(options).run
end

Public Instance Methods

run() click to toggle source

:nocov:

# File lib/fastlane/plugin/test_center/helper/multi_scan_manager/retrying_scan.rb, line 16
def run
  try_count = @options[:try_count] || 1
  begin
    @retrying_scan_helper.before_testrun
    Scan::Runner.new.run
    @retrying_scan_helper.after_testrun
    true
  rescue FastlaneCore::Interface::FastlaneTestFailure => e
    @retrying_scan_helper.after_testrun(e)
    retry if @retrying_scan_helper.testrun_count < try_count
    false
  rescue FastlaneCore::Interface::FastlaneBuildFailure => e
    @retrying_scan_helper.after_testrun(e)
    retry if @retrying_scan_helper.testrun_count < try_count
    false
  end
end