Module: ParallelCucumber::DSL

Defined in:
lib/parallel_cucumber/dsl.rb

Class Method Summary collapse

Class Method Details

.after_batch {|batch_results, batch_id, batch_env| ... } ⇒ Object

Registers a callback hook which will be called at the end of every batch There can be more than one after_batch, they will be invoked sequentially If one hook fails, the rest hooks will be skipped

Yield Parameters:

  • batch_results (optional, Hash)

    results of all tests in a batch

  • batch_id (optional, String)

    batch id

  • batch_env (optional, Hash)

    env of batch



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

def after_batch(&proc)
  Hooks.register_after_batch(proc)
end

.after_workers(&proc) ⇒ Object



30
31
32
# File 'lib/parallel_cucumber/dsl.rb', line 30

def after_workers(&proc)
  Hooks.register_after_workers(proc)
end

.before_batch {|tests, batch_id, batch_env| ... } ⇒ Object

Registers a callback hook which will be called before every batch There can be more than one after_batch, they will be invoked sequentially If one hook fails, the rest hooks will be skipped

Yield Parameters:

  • tests (optional, Array)

    list of tests to run

  • batch_id (optional, String)

    batch id

  • batch_env (optional, Hash)

    env of batch



12
13
14
# File 'lib/parallel_cucumber/dsl.rb', line 12

def before_batch(&proc)
  Hooks.register_before_batch(proc)
end

.before_workers(&proc) ⇒ Object



26
27
28
# File 'lib/parallel_cucumber/dsl.rb', line 26

def before_workers(&proc)
  Hooks.register_before_workers(proc)
end

.on_batch_error(&proc) ⇒ Object



34
35
36
# File 'lib/parallel_cucumber/dsl.rb', line 34

def on_batch_error(&proc)
  Hooks.register_on_batch_error(proc)
end