1 / 37

Behavior Driven Development

Getting Started With. Behavior Driven Development. Lee Brandt. Senior Consultant. Adventure Tech Group. 10 Yrs Programming Early .NET Betas TDD / BDD Enthusiast. leebrandt@gmail.com. www.codebucket.org Twitter: leebrandt. DISCLAIMERS. My opinions are mine, not my employer’s.

abdalla
Télécharger la présentation

Behavior Driven Development

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Getting Started With Behavior Driven Development

  2. Lee Brandt Senior Consultant Adventure Tech Group 10 Yrs Programming Early .NET Betas TDD / BDD Enthusiast leebrandt@gmail.com www.codebucket.org Twitter: leebrandt

  3. DISCLAIMERS • My opinions are mine, not my employer’s. If you don’t like what you hear, blame me. • My opinions are my opinions as of TODAY. And are based on what I know TODAY. • I ALWAYS love to learn if I am doing something wrong. • Continuous learning… ‘nuff said.

  4. Don’t we already have TEST Driven Development?

  5. The Intention

  6. What actually happened.

  7. Test Fixture Class

  8. TDD Comes Up Short not the intent the language misleads not about testing

  9. BDD

  10. BDD is NOT something new

  11. BDD is a shift in TDD language that helps guide you to do TDD the way it was meant to be done.

  12. 3 for $12

  13. (User Voice) Ubiquitous Language

  14. BDD DDD TDD

  15. Questions and Techniques • Implicit Requirements • Garage Example • Foundation • Electrician • Building Permit • Inspection • Outside-In Development • Start with the outermost layer (layer closest to the stakeholder/consumer) • Work your way down the layers • Stay in User Voice

  16. #START:title_and_narrative Feature: code-breaker starts game As a code-breaker I want to start a game So that I can break the code #END:title_and_narrative #START:scenario_only Scenario: start game Given I am not yet playing When I start a new game Then the game should say "Welcome to Mastermind!" And the game should say "Enter guess:" #END:scenario_only

  17. Two Types of BDD • Story-Based (Concentric Circle) • Outside Circle => JBehave, NBehave, Cucumber • Inside Circle => NSpec, MSpec, Rspec • Context-Specification • Outside => Interactions (Lots of Mocks) • Inside => Specs for each Outside Mock

  18. Scrum, Kanban & XP OH MY! • User Stories • Role – Goal – Motivation • As a [Role] I need to [Goal] so that [Motivation] • As an Account Holder I need to be able to transfer funds from my savings to my checking so that I don’t bounce checks. • Scenarios • Context – Action – Observation • Given [Context] When [Action] Then [Observation] • LANGUAGE • All about expressing the user’s needs and • what it means to the user to have those needs filled.

  19. Given I have an inventory of Floogles When loading the floogle search page The System should load an empty search form

  20. Web Interface Windows Interface User Interface User Interface Layer Presentation Layer Domain Objects Services Persistence

  21. .Net Frameworks • SpecUnit.Net • Scott Bellware • MSpec • Part of MultiFunctionMachineMachine • Aaron Jensen & Jacob Lewallen • Nbehave • Jbehave • Joe Ocampo & Jimmy Bogard • NSpecify • Maruis Marais

  22. People

  23. Thank You • Papers • http://behaviour-driven.org • http://dannorth.net/introducing-bdd/ • Videos • http://domaindrivendesign.org/events/oopsla2007/dan_north/ • http://video.google.com/videoplay?docid=8135690990081075324 • http://blog.wekeroad.com/mvc-storefront/kona-3/ • Blogs • http://techblog.daveastels.com/ • http://lizkeogh.com/ • http://dannorth.net/ Lee Brandt Email: leebrandt@gmail.com Twitter: @leebrandt www.codebucket.org

More Related