Your SlideShare is downloading. ×
DevsMeetUp Freiburg: Behavior Driven Development with Behat/Mink
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

DevsMeetUp Freiburg: Behavior Driven Development with Behat/Mink

1,336
views

Published on

Slides of my Introduction to Behavior Driven Development with Behat/Mink at DevsMeetUp Freiburg 06/2013

Slides of my Introduction to Behavior Driven Development with Behat/Mink at DevsMeetUp Freiburg 06/2013

Published in: Technology, Business

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,336
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
3
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. BDD - Behavior Driven Development with Behat/Mink Developers MeetUp Freiburg 06/2013 Developers MeetUp Freiburg
  • 2. Developers MeetUp Freiburg Steffen Müller /gebrüderheitz GmbH PHP Software Architect + Developer @t3node // www.t3node.com
  • 3. Developers MeetUp Freiburg Case Study
  • 4. Developers MeetUp Freiburg “Simple” order form
  • 5. Developers MeetUp Freiburg Related functional tests (Selenium)
  • 6. Developers MeetUp Freiburg How the complexity felt like Image by Kyle Lease CC BY-SA 2.0 http://www.flickr.com/photos/kl75214/
  • 7. Developers MeetUp Freiburg Focus on requirements instead of high coverage
  • 8. Developers MeetUp Freiburg Behavior Driven Development
  • 9. Developers MeetUp Freiburg Behavior What?
  • 10. 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
  • 11. 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
  • 12. Developers MeetUp Freiburg BDD Building the right things TDD Building the things right TDD or BDD?
  • 13. Developers MeetUp Freiburg Communication Images by Alberto Sanchis (MisteryCat) http://misterycat.deviantart.com/ Stakeholder Developer
  • 14. Developers MeetUp Freiburg Ubiquitous Language User Customer Unregistered user New customer Images by Alberto Sanchis (MisteryCat) http://misterycat.deviantart.com/
  • 15. Developers MeetUp Freiburg Feature Description
  • 16. Developers MeetUp Freiburg “As a [role] I want [feature] so that [benefit]” Feature Description
  • 17. Developers MeetUp Freiburg “As a [role] I want [feature] so that [benefit]” User Story Feature Description
  • 18. Developers MeetUp Freiburg “As a customer I need a shopping cart to check my selected products” Example Feature Description
  • 19. Developers MeetUp Freiburg Scenarios / Use cases
  • 20. Developers MeetUp Freiburg Scenario: [Use Case] Given... [Context] When... [Event] Then... [Result] Scenario
  • 21. 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
  • 22. 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
  • 23. gherkin Clearly structured language Easy to understand Easy to rephrase Straightforward syntax Executable steps Developers MeetUp Freiburg
  • 24. Developers MeetUp Freiburg Behat A php framework for testing business expectations
  • 25. Developers MeetUp Freiburg Mink Acceptance test framework for web applications, written in PHP Behat A php framework for testing business expectations
  • 26. Developers MeetUp Freiburg Live Demo
  • 27. 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
  • 28. Developers MeetUp Freiburg Thank You! If you need BDD + Behat/Mink support, send me a mail: Steffen Müller <bdd@t3node.com>