This Behat Extension does two things:
- Trigger BeforeStep and AfterStep hooks when using Chained Steps
- Display pass/fail output in console for Chained Steps
Install using composer:
"jmauerhan/chained-steps-extension": "dev-master@dev"
Configure the Extension in behat.yml. You must use the formatter.
default:
extensions:
JMauerhan\ChainedStepsExtension\Extension:
trigger_hooks: true
show_chained_steps: true
formatter:
name: 'JMauerhan\ChainedStepsExtension\PrettyChainedStepsFormatter'
trigger_hooks: true
show_chained_steps: true (If trigger_hooks is false, show_chained_steps must be false).
tester:
step:
class: JMauerhan\ChainedStepsExtension\StepTester
- Currently the teigger_hooks and show_chained_steps options do not change when set to false, this is a todo. The extension needed some options to work, so I put these in as placeholders
- Chained Steps used within Scenario Outlines will not be printed by the formatter. The @BeforeStep and @AfterStep hooks will still be triggered between chained steps during the Scenario Outline Examples execution.