Class: TestQueue::Runner::Cucumber
Instance Attribute Summary
#concurrency
Instance Method Summary
collapse
#after_fork, #after_fork_internal, #around_filter, #cleanup_worker, #connect_to_relay, #distribute_queue, #execute, #execute_parallel, #execute_sequential, #prepare, #reap_worker, #relay?, #relay_to_master, #spawn_workers, #start_master, #start_relay, #stats, #stats_file, #stop_master, #summarize, #summarize_internal, #worker_completed
Constructor Details
22
23
24
25
26
27
28
|
# File 'lib/test_queue/runner/cucumber.rb', line 22
def initialize
@cli = ::Cucumber::Cli::Main.new(ARGV.dup)
@runtime = ::Cucumber::Runtime.new(@cli.configuration)
@features_loader = @runtime.send(:features)
features = @features_loader.features.sort_by{ |s| -(stats[s.to_s] || 0) }
super(features)
end
|
Instance Method Details
#run_worker(iterator) ⇒ Object
30
31
32
33
|
# File 'lib/test_queue/runner/cucumber.rb', line 30
def run_worker(iterator)
@features_loader.features = iterator
@cli.execute!(@runtime)
end
|
#summarize_worker(worker) ⇒ Object
35
36
37
38
39
40
41
42
43
|
# File 'lib/test_queue/runner/cucumber.rb', line 35
def summarize_worker(worker)
worker.stats.each do |s, val|
stats[s.to_s] = val
end
output = worker.output.gsub(/\e\[\d+./,'')
worker.summary = output.split("\n").grep(/^\d+ (scenarios?|steps?)/).first
worker.failure_output = output.scan(/^Failing Scenarios:\n(.*)\n\d+ scenarios?/m).join("\n")
end
|