Class: ParallelCucumber

Inherits:
ParallelTests show all
Defined in:
lib/parallel_cucumber.rb,
lib/parallel_cucumber/runtime_logger.rb

Defined Under Namespace

Classes: RuntimeLogger

Constant Summary

Constants inherited from ParallelTests

ParallelTests::VERSION

Class Method Summary collapse

Methods inherited from ParallelTests

execute_command, find_results, parse_rake_args, summarize_results, test_env_number, tests_in_groups

Class Method Details

.executableObject



13
14
15
16
17
18
19
20
21
# File 'lib/parallel_cucumber.rb', line 13

def self.executable
  if bundler_enabled?
    "bundle exec cucumber"
  elsif File.file?("script/cucumber")
    "script/cucumber"
  else
    "cucumber"
  end
end

.run_tests(test_files, process_number, options) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/parallel_cucumber.rb', line 4

def self.run_tests(test_files, process_number, options)
  color = ($stdout.tty? ? 'AUTOTEST=1 ; export AUTOTEST ;' : '')#display color when we are in a terminal
  runtime_logging = " --format ParallelCucumber::RuntimeLogger --out #{runtime_log}"
  cmd = "#{color} #{executable}"
  cmd << runtime_logging if File.directory?(File.dirname(runtime_log))
  cmd << " #{options[:test_options]} #{test_files*' '}"
  execute_command(cmd, process_number, options)
end

.runtime_logObject



23
24
25
# File 'lib/parallel_cucumber.rb', line 23

def self.runtime_log
  'tmp/parallel_runtime_cucumber.log'
end