This document discusses Behavior Driven Development (BDD) and the Behat testing framework. It begins with an overview of BDD and its principles. It then addresses common questions around when and how to start BDD, what to test, and how to understand test failures. The document introduces Gherkin and Behat, an open source BDD framework for PHP inspired by Cucumber. It concludes with a demo of Behat and references for further information.
4. Nathan Lisgo
✤ Developer for over 14 years
✤ Drupal 4 years
✤ @nlisgo
✤ https://drupal.org/user/796872
5. BDD is a second-generation, outside-in, pull-based,
multiple-stakeholder, multiple-scale, high-automation,
agile methodology. It describes a cycle of interactions
with well-defined outputs, resulting in the delivery of
working, tested software that matters.
Dan North, How to sell BDD to the business
6. ✤ Where to start in the process
✤ What to test and what not to test
✤ How much to test in one go
✤ What to call the tests
✤ How to understand why a test fails
Behavioural Driven Development
7. When is the project complete?
✤ When the time is up?
✤ When the money is spent?
✤ When the requirements have been met?
8. Specification as a ubiquitous language
✤ Semi formal language shared by all team members (including non-
technical)
✤ Language is both used and developed by all team members
✤ Common means of discussing the domain of the software
✤ Specification of desired behaviour