Skip to main content

 

You are here

BEHAT

Behat is a tool that makes behaviour driven development (BDD) possible. 

Behat is a tool that makes behaviour driven development (BDD) possible. With BDD, we write human-readable stories that describe the behaviour of your application. These stories can then be auto-tested against your application.

Here is a BEHAT test scenario for a search feature

User Story:  Search site

  • In order to find content on the site
  • As a website user
  • I need to be able to search for a word

Test Scenario: Searching for content that does exist

  • Given I am on the homepage
  • When I fill in "searchBox" with "test"
  • And I press "searchButton"
  • Then I should see "test page"