Behat is an open source BDD tool. It's a PHP framework for autotesting your business expectation. With BDD, you write human-readable stories that describe the behaviour of your application. These stories can then be auto-tested against your application.
Some key points about Behat
- Behat was created by Konstantin Kudryashov and its development is hosted on GitHub.
- Behat was inspired by Ruby's Cucumber project. Philosophies of both Cucumber and Behat are one and the same. Since v3.0, Behat is considered as an official Cucumber implementation in PHP and is part of one big family of BDD tools.
- Behat is only supported by PHP. Unlike Cucumber which support many programming languages, Behat support PHP only.
- Behat can also be extended by writing custom PHP functions. With power of PHP, Behat is not limited to its predefined functions.
- Behat was developed for BA, QA and developers, so as to bridge the gap between business stakeholders and the development team.
- Behat helps completely achieve the client requirements because it works according to the Acceptance Criteria of the project.
- Behat Features and Scenarios are written in Gherkin Language.
- Behat support Mink and Drupal Extension. To simulate this interaction between the browser and the web application in our tests, We need Mink. The Drupal Extension is an integration layer between Behat, Mink Extension, and Drupal. It provides step definitions for common testing scenarios specific to Drupal sites.