0.0
No commit activity in last 3 years
No release in over 3 years
cucumber helpers (steps) for testing ruote process definitions and participants
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

>= 2.1.9
 Project Readme

ruote-cukes¶ ↑

Cucumber helpers (steps) for testing ruote process definitions and participants.

Scenario: alpha to bravo
  Given I have a ruote engine
  And the catchall participant is registered
  When I launch the flow
    """
    Ruote.process_definition do
      sequence do
        alpha
        participant :ref => '${f:next}'
      end
    end
    """
  Then the process should reach alpha
  When I get the first workitem of participant alpha
  And I update the workitem with
    | next | charly |
  And I reply with the workitem
  Then the process should reach charly

Note the usage of two columns cucumber tables for storing fields (or variables). The first column hold the keys, while the second one the values.

Look at features/ for the whole range of examples.

using them¶ ↑

gem install ruote-cukes

then make sure to include

require 'ruote-cukes'

in your feature support or step definitions.

complex fields¶ ↑

When using cucumber tables to represent fields (or variables), ruote-cukes will always try to decode the values via JSON. This thus becomes possible :

Scenario: alpha to bravo
  Given I have a ruote engine
  And the catchall participant is registered
  And the initial fields are
    | targets | ["alice","bob"] |
  When I launch the flow
    """
    Ruote.process_definition do
      concurrent_iterator :on_field => 'targets', :to_f => 'f' do
        participant :ref => '${f:f}'
      end
    end
    """
  Then the process should reach alice
  And the process should reach bob

running the example features¶ ↑

Make sure the ruote and cucumber gems are installed and run

cucumber

author¶ ↑

John Mettraux jmettraux.wordpress.com

license¶ ↑

MIT