Behat (computer science)

- 11.46

National Science Foundation grant bolsters Northeastern's work to ...
photo src: news.northeastern.edu

Behat is a test framework for behavior-driven development written in the PHP programming language. Behat was created by Konstantin Kudryashov and its development is hosted on GitHub.


Shmoop releases computer science, technology courses - eCampus News
photo src: www.ecampusnews.com


Maps, Directions, and Place Reviews



Purpose

Behat is intended to aid communication between developers, clients and other stakeholders during a software development process. It allows the clear documentation of testable examples of the software's intended behaviour. Behat test scenarios are written with Gherkin, a business-readable domain-specific language following defined patterns.


Computer Science News Video



Benefits

Tests can be run at any point new code is introduced into a codebase to confirm no regressions within the existing test coverage are introduced. It can be integrated with Selenium and other browser emulators to generate screenshots of failures. Like other BDD frameworks, Behat scenarios are a series of Given, When, and Then steps that explain a business case. The definition of these steps exist within method annotations of a class that extends the BehatContext.


Allen School News » UW, Berkeley, NYU collaborate on $37.8M data ...
photo src: news.cs.washington.edu


Examples

The preconditions after "Given" correspond to the PHP method name to execute:

Source of the article : Wikipedia



EmoticonEmoticon

 

Start typing and press Enter to search