Step definitions in external files in Behat
Behat by default looks for the step definitions in file named FeatureContext (all steps in one file). Having a lot of steps, it's hard to maintain such a big file. I'd like to have one definition file per feature file. How can I have step definitions in external files? e.g. homepage.feature HomepageContext extends FeatureContext Use class inheritance and separate contexts. # /features/contexts/ AbstractContext extends BehatContext {} FeaturenameContext extends AbstractContext {} Then in /feature/FeatureContext.php import the context files: /** * Initializes context. * Every scenario gets it's