SlideShare una empresa de Scribd logo
1 de 28
Descargar para leer sin conexión
BDD - Behavior Driven
Development
with Behat/Mink
Developers MeetUp Freiburg 06/2013
Developers MeetUp Freiburg
Developers MeetUp Freiburg
Steffen Müller
/gebrüderheitz GmbH
PHP Software Architect + Developer
@t3node // www.t3node.com
Developers MeetUp Freiburg
Case Study
Developers MeetUp Freiburg
“Simple” order form
Developers MeetUp Freiburg
Related functional tests (Selenium)
Developers MeetUp Freiburg
How the complexity felt like
Image by Kyle Lease CC BY-SA 2.0 http://www.flickr.com/photos/kl75214/
Developers MeetUp Freiburg
Focus on requirements
instead of high coverage
Developers MeetUp Freiburg
Behavior Driven
Development
Developers MeetUp Freiburg
Behavior What?
Developers MeetUp Freiburg
Analyze
Concept
Test
Coding
Linear progress
Sketch inspired by J. B. Rainsberger:
http://www.jbrains.ca/permalink/how-test-driven-development-works-and-more
Developers MeetUp Freiburg
Analyze Concept
Test Coding
Continuous Iteration
Short
cycles
Sketch inspired by J. B. Rainsberger:
http://www.jbrains.ca/permalink/how-test-driven-development-works-and-more
Developers MeetUp Freiburg
BDD
Building the
right things
TDD
Building the
things right
TDD or BDD?
Developers MeetUp Freiburg
Communication
Images by Alberto Sanchis (MisteryCat)
http://misterycat.deviantart.com/
Stakeholder
Developer
Developers MeetUp Freiburg
Ubiquitous Language
User
Customer
Unregistered
user
New customer
Images by Alberto Sanchis (MisteryCat)
http://misterycat.deviantart.com/
Developers MeetUp Freiburg
Feature Description
Developers MeetUp Freiburg
“As a [role]
I want [feature]
so that [benefit]”
Feature Description
Developers MeetUp Freiburg
“As a [role]
I want [feature]
so that [benefit]”
User Story
Feature Description
Developers MeetUp Freiburg
“As a customer
I need a shopping cart
to check my selected products”
Example Feature Description
Developers MeetUp Freiburg
Scenarios / Use cases
Developers MeetUp Freiburg
Scenario: [Use Case]
Given... [Context]
When... [Event]
Then... [Result]
Scenario
Developers MeetUp Freiburg
Scenario: See selected products in the
shopping cart
Given I visit the FooBar shop
And I add a “dishwasher” to my cart
When I go to the shopping cart
Then I should see a “dishwasher”
Example Scenario
Developers MeetUp Freiburg
Scenario: Find a product in the shopping basket
Given I visit the FooBar shop
And I select a “dishwasher”
When I go to the shopping basket
Then I should see a “dishwasher”gherkin
Example Scenario
gherkin
Clearly structured language
Easy to understand
Easy to rephrase
Straightforward syntax
Executable steps
Developers MeetUp Freiburg
Developers MeetUp Freiburg
Behat
A php framework for testing
business expectations
Developers MeetUp Freiburg
Mink
Acceptance test framework
for web applications, written in PHP
Behat
A php framework for testing
business expectations
Developers MeetUp Freiburg
Live Demo
Resources
BDD Introduction:
http://dannorth.net/introducing-bdd/
Behat/Mink:
http://behat.org/
bInit: kickstarter package for Behat:
https://github.com/t3node/binit
Wynne + Hellesøy (2012):
“The Cucumber Book”
Developers MeetUp Freiburg
Developers MeetUp Freiburg
Thank You!
If you need BDD + Behat/Mink support, send me a mail:
Steffen Müller <bdd@t3node.com>

Más contenido relacionado

Similar a DevsMeetUp Freiburg: Behavior Driven Development with Behat/Mink

Passing The Joel Test In The PHP World
Passing The Joel Test In The PHP WorldPassing The Joel Test In The PHP World
Passing The Joel Test In The PHP World
Lorna Mitchell
 

Similar a DevsMeetUp Freiburg: Behavior Driven Development with Behat/Mink (20)

Intro to js august 31
Intro to js august 31Intro to js august 31
Intro to js august 31
 
Moving away from legacy code with BDD
Moving away from legacy code with BDDMoving away from legacy code with BDD
Moving away from legacy code with BDD
 
Intro to js september 19
Intro to js september 19Intro to js september 19
Intro to js september 19
 
Build Your Own Website with HTML/CSS
Build Your Own Website with HTML/CSSBuild Your Own Website with HTML/CSS
Build Your Own Website with HTML/CSS
 
Build Your Own Website with HTML/CSS 8.15
Build Your Own Website with HTML/CSS 8.15Build Your Own Website with HTML/CSS 8.15
Build Your Own Website with HTML/CSS 8.15
 
Considerations For an API Strategy - Ronnie MItra API Architect Layer 7 Londo...
Considerations For an API Strategy - Ronnie MItra API Architect Layer 7 Londo...Considerations For an API Strategy - Ronnie MItra API Architect Layer 7 Londo...
Considerations For an API Strategy - Ronnie MItra API Architect Layer 7 Londo...
 
website la 11/28
website la 11/28website la 11/28
website la 11/28
 
Headless commerce for developers - How to start a store
Headless commerce for developers - How to start a storeHeadless commerce for developers - How to start a store
Headless commerce for developers - How to start a store
 
Foundations for the perfect technology stream
Foundations for the perfect technology streamFoundations for the perfect technology stream
Foundations for the perfect technology stream
 
PHP CE 2018 - Building Symfony application with Ports and Adapters approach a...
PHP CE 2018 - Building Symfony application with Ports and Adapters approach a...PHP CE 2018 - Building Symfony application with Ports and Adapters approach a...
PHP CE 2018 - Building Symfony application with Ports and Adapters approach a...
 
Build Your Own Website with HTML/CSS - July - LA
Build Your Own Website with HTML/CSS - July - LABuild Your Own Website with HTML/CSS - July - LA
Build Your Own Website with HTML/CSS - July - LA
 
DevOps + MongoDB Serverless = 
DevOps + MongoDB Serverless = DevOps + MongoDB Serverless = 
DevOps + MongoDB Serverless = 
 
SAPTechED 2015 UX114 -Building custom SAP Fiori Apps Using SAP Web IDE
SAPTechED 2015 UX114 -Building custom SAP Fiori Apps Using SAP Web IDESAPTechED 2015 UX114 -Building custom SAP Fiori Apps Using SAP Web IDE
SAPTechED 2015 UX114 -Building custom SAP Fiori Apps Using SAP Web IDE
 
When e-commerce meets Symfony
When e-commerce meets SymfonyWhen e-commerce meets Symfony
When e-commerce meets Symfony
 
Agile android
Agile androidAgile android
Agile android
 
Passing The Joel Test In The PHP World
Passing The Joel Test In The PHP WorldPassing The Joel Test In The PHP World
Passing The Joel Test In The PHP World
 
Do more with LESS, Handlebars, Coffeescript and other Web Resources in AEM
Do more with LESS, Handlebars, Coffeescript and other Web Resources in AEMDo more with LESS, Handlebars, Coffeescript and other Web Resources in AEM
Do more with LESS, Handlebars, Coffeescript and other Web Resources in AEM
 
Behaviour Driven Development V 0.1
Behaviour Driven Development V 0.1Behaviour Driven Development V 0.1
Behaviour Driven Development V 0.1
 
Intro to JavaScript - LA - July
Intro to JavaScript - LA - JulyIntro to JavaScript - LA - July
Intro to JavaScript - LA - July
 
Silverlight Demos For Beginners
Silverlight Demos For BeginnersSilverlight Demos For Beginners
Silverlight Demos For Beginners
 

Más de Steffen Müller

Más de Steffen Müller (6)

The art of writing bug reports
The art of writing bug reportsThe art of writing bug reports
The art of writing bug reports
 
BDD Einführung @TYPO3camp RheinRuhr 2012
BDD Einführung @TYPO3camp RheinRuhr 2012BDD Einführung @TYPO3camp RheinRuhr 2012
BDD Einführung @TYPO3camp RheinRuhr 2012
 
Logging session @TYPO3camp Stuttgart 2013
Logging session @TYPO3camp Stuttgart 2013Logging session @TYPO3camp Stuttgart 2013
Logging session @TYPO3camp Stuttgart 2013
 
Refactoring TYPO3 Logging
Refactoring TYPO3 LoggingRefactoring TYPO3 Logging
Refactoring TYPO3 Logging
 
The 36 chambers of TYPO3 Logging
The 36 chambers of TYPO3 LoggingThe 36 chambers of TYPO3 Logging
The 36 chambers of TYPO3 Logging
 
T3CON11: Lazy Development using the Extension Builder
T3CON11: Lazy Development using the Extension BuilderT3CON11: Lazy Development using the Extension Builder
T3CON11: Lazy Development using the Extension Builder
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

DevsMeetUp Freiburg: Behavior Driven Development with Behat/Mink