For Developers – Chained steps not supported in Behat 3 #MoodleDev #Moodle3.1

April 14th, 2016

Behat 3 is a open source behavioural driven development (BDD) tool written in PHP, it can parse a human-readable list of sentences (called steps) and execute actions in a browser using Selenium or other tools to simulate user interactions.

Now since Behat 3 is out for a while so its time to upgrade from Behat 2.5 to Behat 3 according to this Tracker issue MDL-46891 which is fixed in the upcoming Moodle version i.e. Moodle 3.1.

Behat 3 brings a lot of extensibility and modularity for the price of backward compatibility break. So, Rajesh Taneja has created a migration guide for migrating from Behat 2.5 to Behat 3 which you can access here.

The main issue which will affect a lot of developers is that the chained steps are no more supported. Although some support is provided with custom moodle behat extensions which will be deprecated soon. To make your context backward compatible you should replace chained steps with the API calls in your context. Read More about Chained steps here.

Please note that this information is meant for developers only and shouldn’t be used on production sites.