behat, behavioral driven development (bdd) in php

31
BDD, using Behat from Use Case to implementation Herman Peeren 8 mei 2014, 010PHP

Upload: herman-peeren

Post on 10-May-2015

581 views

Category:

Software


2 download

DESCRIPTION

In order to improve the software development process you should use the language of the domain you are modeling. Behat, a tool for Behavior Driven Development in PHP, can help in the communication with the domain-expert / product-owner.

TRANSCRIPT

Page 1: Behat, Behavioral Driven Development (BDD) in PHP

BDD, using Behat from Use Case to implementation

Herman Peeren8 mei 2014, 010PHP

Page 2: Behat, Behavioral Driven Development (BDD) in PHP

Developing software not easy

Page 3: Behat, Behavioral Driven Development (BDD) in PHP

improved a bit over the years:

Page 4: Behat, Behavioral Driven Development (BDD) in PHP

Waterfall

Page 5: Behat, Behavioral Driven Development (BDD) in PHP

Waterfall vs Agile

iterations (sprints)

Page 6: Behat, Behavioral Driven Development (BDD) in PHP

Waterfall vs Agile

Page 7: Behat, Behavioral Driven Development (BDD) in PHP
Page 8: Behat, Behavioral Driven Development (BDD) in PHP
Page 9: Behat, Behavioral Driven Development (BDD) in PHP
Page 10: Behat, Behavioral Driven Development (BDD) in PHP
Page 11: Behat, Behavioral Driven Development (BDD) in PHP
Page 12: Behat, Behavioral Driven Development (BDD) in PHP

DDDTDDBDD

Page 13: Behat, Behavioral Driven Development (BDD) in PHP

Sapir–Whorf hypothesis

Linguistic relativity:

Structure of a language affects the ways in which its respective speakers conceptualize their world.

голубой

Wilhelm von Humboldt Franz Boas Edward Sapir

Page 14: Behat, Behavioral Driven Development (BDD) in PHP

Nelleke Verhoeff, Red Cheeks Factory,

Page 15: Behat, Behavioral Driven Development (BDD) in PHP

Nelleke Verhoeff, Red Cheeks Factory,

Page 16: Behat, Behavioral Driven Development (BDD) in PHP

DDD

ubiquitous language:

using the language of the domain you are modeling

Page 17: Behat, Behavioral Driven Development (BDD) in PHP

TDDTests afterwards are boring, I like to create new things!

Page 18: Behat, Behavioral Driven Development (BDD) in PHP

TDDTests first!

Page 19: Behat, Behavioral Driven Development (BDD) in PHP
Page 20: Behat, Behavioral Driven Development (BDD) in PHP

Some recent TDD critics

•architecture destroyed by unit-level-tests•easy to measure doesn’t mean it’s important

David Heinemeier Hansson (‘DHH’)http://www.confreaks.com/videos/3315-railsconf-keynote

James Coplien (‘Cope’)www.rbcs-us.com/documents/Why-Most-Unit-Testing-is-Waste.pdf

Page 21: Behat, Behavioral Driven Development (BDD) in PHP

BDD

Dan Northhttp://dannorth.net/introducing-bdd/

Functional testing

Page 22: Behat, Behavioral Driven Development (BDD) in PHP
Page 23: Behat, Behavioral Driven Development (BDD) in PHP

Seleniumhttp://docs.seleniumhq.org/

Page 24: Behat, Behavioral Driven Development (BDD) in PHP

Selenium in PHPUnithttp://phpunit.de/manual/current/en/selenium.html

Acceptence testing

Page 25: Behat, Behavioral Driven Development (BDD) in PHP

Behathttp://behat.org/

Page 26: Behat, Behavioral Driven Development (BDD) in PHP

Behat

•based on Cucumber (Gherkin language)•given - when - then

Page 27: Behat, Behavioral Driven Development (BDD) in PHP

Behat: define features

steps suggestions

Page 28: Behat, Behavioral Driven Development (BDD) in PHP

define steps

Page 29: Behat, Behavioral Driven Development (BDD) in PHP

Minkhttp://mink.behat.org/

Page 30: Behat, Behavioral Driven Development (BDD) in PHP

Codeceptionhttp://codeception.com/

No Gherkin-language, but PHP (new WebGuy)

Page 31: Behat, Behavioral Driven Development (BDD) in PHP