Class: Applitools::ClassicRunner

Inherits:
EyesRunner show all
Defined in:
lib/applitools/core/classic_runner.rb

Instance Attribute Summary collapse

Attributes inherited from EyesRunner

#batches_server_connectors_map

Instance Method Summary collapse

Methods inherited from EyesRunner

#add_batch, #delete_all_batches

Constructor Details

#initializeClassicRunner

Returns a new instance of ClassicRunner.



7
8
9
10
11
# File 'lib/applitools/core/classic_runner.rb', line 7

def initialize
  super
  self.all_test_results = []
  self.all_pending_exceptions = {}
end

Instance Attribute Details

#all_pending_exceptionsObject

Returns the value of attribute all_pending_exceptions.



6
7
8
# File 'lib/applitools/core/classic_runner.rb', line 6

def all_pending_exceptions
  @all_pending_exceptions
end

#all_test_resultsObject

Returns the value of attribute all_test_results.



6
7
8
# File 'lib/applitools/core/classic_runner.rb', line 6

def all_test_results
  @all_test_results
end

Instance Method Details

#aggregate_exceptions(result, exception) ⇒ Object



18
19
20
# File 'lib/applitools/core/classic_runner.rb', line 18

def aggregate_exceptions(result, exception)
  all_pending_exceptions[result] = exception
end

#aggregate_result(test_result) ⇒ Object



13
14
15
16
# File 'lib/applitools/core/classic_runner.rb', line 13

def aggregate_result(test_result)
  Applitools::ArgumentGuard.is_a?(test_result, 'test_result', Applitools::TestResults)
  all_test_results << test_result
end

#get_all_test_results(throw_exception = false) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/applitools/core/classic_runner.rb', line 22

def get_all_test_results(throw_exception = false)
  begin
    if throw_exception
      all_pending_exceptions.each do |_result, exception|
        raise exception
      end
    end
  ensure
    delete_all_batches
  end
  all_test_results
end

#rendering_info(connector) ⇒ Object



35
36
37
# File 'lib/applitools/core/classic_runner.rb', line 35

def rendering_info(connector)
  @rendering_info ||= RenderingInfo.new(connector.rendering_info)
end