Class: Applitools::Selenium::VisualGridRunner
- Inherits:
-
EyesRunner
- Object
- EyesRunner
- Applitools::Selenium::VisualGridRunner
- Defined in:
- lib/applitools/selenium/visual_grid/visual_grid_runner.rb
Constant Summary collapse
- DEFAULT_CONCURRENCY =
5
Instance Attribute Summary collapse
-
#all_pending_exceptions ⇒ Object
Returns the value of attribute all_pending_exceptions.
-
#all_test_results ⇒ Object
Returns the value of attribute all_test_results.
-
#test_concurrency ⇒ Object
readonly
Returns the value of attribute test_concurrency.
Instance Method Summary collapse
- #aggregate_exceptions(result, exception) ⇒ Object
- #aggregate_result(test_result) ⇒ Object
- #get_all_test_results(throw_exception = false) ⇒ Object
-
#initialize(concurrency_or_options = DEFAULT_CONCURRENCY, mask_log = nil) ⇒ VisualGridRunner
constructor
A new instance of VisualGridRunner.
- #universal_eyes_manager_config ⇒ Object
Constructor Details
#initialize(concurrency_or_options = DEFAULT_CONCURRENCY, mask_log = nil) ⇒ VisualGridRunner
Returns a new instance of VisualGridRunner.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/applitools/selenium/visual_grid/visual_grid_runner.rb', line 11 def initialize( = DEFAULT_CONCURRENCY, mask_log = nil) if .is_a?(Hash) @test_concurrency = [:test_concurrency] || DEFAULT_CONCURRENCY mask_log = [:mask_log] else @test_concurrency = || DEFAULT_CONCURRENCY end super(mask_log) self.all_test_results = [] self.all_pending_exceptions = {} end |
Instance Attribute Details
#all_pending_exceptions ⇒ Object
Returns the value of attribute all_pending_exceptions.
6 7 8 |
# File 'lib/applitools/selenium/visual_grid/visual_grid_runner.rb', line 6 def all_pending_exceptions @all_pending_exceptions end |
#all_test_results ⇒ Object
Returns the value of attribute all_test_results.
6 7 8 |
# File 'lib/applitools/selenium/visual_grid/visual_grid_runner.rb', line 6 def all_test_results @all_test_results end |
#test_concurrency ⇒ Object (readonly)
Returns the value of attribute test_concurrency.
7 8 9 |
# File 'lib/applitools/selenium/visual_grid/visual_grid_runner.rb', line 7 def test_concurrency @test_concurrency end |
Instance Method Details
#aggregate_exceptions(result, exception) ⇒ Object
28 29 30 |
# File 'lib/applitools/selenium/visual_grid/visual_grid_runner.rb', line 28 def aggregate_exceptions(result, exception) all_pending_exceptions[result] = exception end |
#aggregate_result(test_result) ⇒ Object
23 24 25 26 |
# File 'lib/applitools/selenium/visual_grid/visual_grid_runner.rb', line 23 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
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/applitools/selenium/visual_grid/visual_grid_runner.rb', line 32 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_universal_results = close_all_eyes Applitools::TestResultSummary.new(all_universal_results) end |
#universal_eyes_manager_config ⇒ Object
46 47 48 |
# File 'lib/applitools/selenium/visual_grid/visual_grid_runner.rb', line 46 def universal_eyes_manager_config Applitools::UniversalEyesManagerConfig.vg(test_concurrency) end |