class ParallelTests::Cucumber::Runner

Constants

SCENARIOS_RESULTS_BOUNDARY_REGEX
SCENARIO_REGEX

Public Class Methods

command_with_seed(cmd, seed) click to toggle source
# File lib/parallel_tests/cucumber/runner.rb, line 34
def command_with_seed(cmd, seed)
  clean = cmd.sub(/\s--order\s+random(:\d+)?\b/, '')
  "#{clean} --order random:#{seed}"
end
line_is_result?(line) click to toggle source
# File lib/parallel_tests/cucumber/runner.rb, line 14
def line_is_result?(line)
  super || line =~ SCENARIO_REGEX || line =~ SCENARIOS_RESULTS_BOUNDARY_REGEX
end
name() click to toggle source
# File lib/parallel_tests/cucumber/runner.rb, line 10
def name
  'cucumber'
end
summarize_results(results) click to toggle source
# File lib/parallel_tests/cucumber/runner.rb, line 18
def summarize_results(results)
  output = []

  scenario_groups = results.slice_before(SCENARIOS_RESULTS_BOUNDARY_REGEX).group_by(&:first)
  scenario_groups.each do |header, group|
    scenarios = group.flatten.grep(SCENARIO_REGEX)
    if scenarios.any?
      output << ([header] + scenarios).join("\n")
    end
  end

  output << super

  output.join("\n\n")
end