Skip to main content

Introduction to Behat

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.

Video Tutorial: Introduction to Behat Tool

Submitted by tgoswami on September 5, 2020

Tarun has 11+ years of experience in Quality Assurance in different domains like Banking, E-commerce, Health and Education.


At ProgramsBuzz, you can learn, share and grow with millions of techie around the world from different domain like Data Science, Software Development, QA and Digital Marketing. You can ask doubt and get the answer for your queries from our experts.