Behat Mink webdriver session is destroyed after every feature in a suite Behat Mink webdriver session is destroyed after every feature in a suite selenium selenium

Behat Mink webdriver session is destroyed after every feature in a suite


Features and scenarios should be independent. It is THE expected behaviour that if you do something in one scenario, the state is not carried to the next one.

I'm not sure what you're trying to achieve but you definitely doing something wrong.

Edit:

If you need to log user in before every scenario simply write a meta step which will perform all the necessary operations:

Given I am logged in

You could use step execution chaining or simply call Mink directly.

If every scenario in your feature file requires logging in you can use background:

Background:    Given I am logged inScenario: Listing users    Given ...Scenario: Removing a user    Given ...


I completely agree with Jakub Zalas answer

Still if your goal is to get rid of duplicate code declaring background in every feature i believe you can use hooks to perform all required actions before each scenario