Class: TestQueue::Runner::Cucumber
- Inherits:
-
TestQueue::Runner
- Object
- TestQueue::Runner
- TestQueue::Runner::Cucumber
- Defined in:
- lib/test_queue/runner/cucumber.rb
Constant Summary
Constants inherited from TestQueue::Runner
Instance Attribute Summary
Attributes inherited from TestQueue::Runner
#concurrency, #exit_when_done, #stats
Instance Method Summary collapse
-
#initialize ⇒ Cucumber
constructor
A new instance of Cucumber.
- #run_worker(iterator) ⇒ Object
- #summarize_worker(worker) ⇒ Object
Methods inherited from TestQueue::Runner
#abort, #after_fork, #after_fork_internal, #around_filter, #awaiting_suites?, #cleanup_worker, #collect_worker_data, #connect_to_relay, #discover_suites, #distribute_queue, #enqueue_discovered_suite, #execute, #execute_internal, #kill_subprocesses, #kill_suite_discovery_process, #kill_workers, #prepare, #queue_status, #reap_suite_discovery_process, #reap_workers, #relay?, #relay_to_master, #spawn_workers, #start_master, #start_relay, #stats_file, #stop_master, #summarize, #summarize_internal, #worker_completed
Constructor Details
#initialize ⇒ Cucumber
Returns a new instance of Cucumber.
49 50 51 |
# File 'lib/test_queue/runner/cucumber.rb', line 49 def initialize super(TestFramework::Cucumber.new) end |
Instance Method Details
#run_worker(iterator) ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/test_queue/runner/cucumber.rb', line 53 def run_worker(iterator) runtime = @test_framework.runtime runtime.features = iterator @test_framework.cli.execute!(runtime) if runtime.respond_to?(:summary_report, true) runtime.send(:summary_report).test_cases.total_failed else runtime.results.scenarios(:failed).size end end |
#summarize_worker(worker) ⇒ Object
66 67 68 69 70 |
# File 'lib/test_queue/runner/cucumber.rb', line 66 def summarize_worker(worker) 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 |