Class: EasyAutomation::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/easy_automation/runner.rb

Class Method Summary collapse

Class Method Details

.configurationObject



22
23
24
25
26
27
# File 'lib/easy_automation/runner.rb', line 22

def configuration
  unless @configuration
    @configuration = Config.new
  end
  @configuration
end

.configure {|configuration| ... } ⇒ Object

Yields:



29
30
31
# File 'lib/easy_automation/runner.rb', line 29

def configure
  yield configuration
end

.run(test_suite) ⇒ Object



33
34
35
36
37
38
39
40
41
42
43
# File 'lib/easy_automation/runner.rb', line 33

def run test_suite
  raise RunnerSuiteException.new('Wrong test suite class') unless test_suite.is_a?(Suite)
  Server.rc.start
  configuration.execute :before, :all
  configuration.browsers.each do |browser|
    configuration.current_browser = browser
    ::Test::Unit::UI::Console::TestRunner.run test_suite
  end
  configuration.execute :after, :all
  Server.rc.stop
end