When you start a new project with Behat, perhaps the first things to think about – after integrating BDD into your workflow – will be getting browser automation working, and writing your first tests.
Otherwise, if you are unsure how to proceed, first check the FAQ and the other recipe pages in the menu. These will be added to when we receive repeat questions. If you encounter a bug, have a suggestion, or would like to help the project grow, please get in contact via Github or our Slack.
One of the fun things about using Behat is seeing it control your web browser and navigating your site. Behat relies on a library called Mink to interface with your web browser. Mink has its own driver system, with each driver supporting a different combination of browser features.
Your first tests¶
To confirm your Behat set up is working, copy any one (or all!) of WordHat’s own tests from
vendor/paulgibbs/behat-wordpress-extension/features/*.feature into your project’s
Run Behat with
vendor/bin/behat, and the tests you copied should pass if everything is working.