Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

1. New Run Configuration for Behat can be created either in Run | Edit configurations... menu, or with the same action from the toolbar:


2. Add a new configuration with   button and select Behat

3. Provide path to the directory which contains test scenarios (/Users/user/PhpStormProjects/Behat/features in our case). Test scope can be defined as a Directory, File, Scenario or Defined in configuration file. There are many additional options which can be configured in this dialog (such as alternative Behat configuration file, test runner options, command line options, actions to be performed before launch).

4. If you haven't configured path to Behat directory or behat.phar file before, PhpStorm will offer you to do so with a Fix button in the run configuration dialog. Provide path to Behat and default configuration file (if needed).

Behat configuration can be always changes in Settings | PHP | Behat.

...

Apart from standard workflow which involves providing paths to test scenarios manually, you can invoke context action Create Run Configuration | Folder name (with Behat icon) _or create and run it straight away with _Run | Folder name (with Behat icon) for folders in Project Tool Window:

Same actions are available in Run | Run menu (Alt + Shift + F10 / Ctrl - Alt - R):

...