Behat - Drupal Yorkshire

Post on 08-May-2015

3.229 views 0 download

description

Behat Presentation given at Drupal Yorkshire on June 11th 2013.

Transcript of Behat - Drupal Yorkshire

11th June 2013

BehatBehavioural Driven Development for PHP

What’s in the box?

What should be in the box?

Nathan Lisgo

✤ Developer for over 14 years

✤ Drupal 4 years

✤ @nlisgo

✤ https://drupal.org/user/796872

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

✤ 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

When is the project complete?

✤ When the time is up?

✤ When the money is spent?

✤ When the requirements have been met?

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

Gherkin

Gherkin

Behat

✤ Konstantin Kudryashov (@everzet)

✤ PHP 5.3

✤ Behat was inspired by Ruby's Cucumber project, especially its syntax

Demo

✤ https://github.com/nlisgo/drupalyorkshire-behat

Questions

References

✤ http://dannorth.net/introducing-bdd/

✤ http://dannorth.net/whats-in-a-story/

✤ http://behat.org/

✤ http://everzet.com/