Your SlideShare is downloading. ×
0
An Introduction to   Behavior Driven Design                       Shawn Wallace                National Service Offering L...
I’m Shawn
I’m ShawnFavorite Movie
I’m ShawnFavorite MovieMy dog
I’m ShawnFavorite MovieMy dogMy Son
I’m ShawnFavorite MovieMy dogMy SonMy Daughter
I’m ShawnFavorite MovieMy dogMy SonMy DaughterMy Family
I’m ShawnFavorite MovieMy dogMy SonMy DaughterMy FamilyI live here
I’m ShawnFavorite MovieMy dogMy SonMy DaughterMy Family I live hereI a Marine Vet
I’m ShawnFavorite MovieMy dogMy SonMy DaughterMy Family I live hereI a Marine VetMy Favorite Team
I’m ShawnFavorite MovieMy dogMy SonMy DaughterMy Family I live hereI a Marine VetMy Favorite TeamWhere I work
I’m not a BA
A programmer is going out for a stroll oneevening. His wife asks him to swing by thestore and pick up a gallon of milk, an...
5
Our existences are  about precise communication
The Problem with Agility
We are trying to “productize”  our approaches...again.
We are trying to “productize”  our approaches...again.
Fundamentally agileis aboutapproaching thework in a differentway.                 11
12
We need thinkingbusiness analysts
14
15
We’re not building a     house...
We’re cleaning the     house...
It’s NOT easy•   It is MUCH easier to slice up a backlog    horizontally•   Developers want to work horizontally    (effici...
http://www.deltamatrix.com/2012-04-17-04-37-50/horizontal-and-vertical-user-stories-slicing-the-cake
Why vertical slices?It is about delivering working functionality as               soon as possible.                  Feedb...
http://www.deltamatrix.com/2012-04-17-04-37-50/horizontal-and-vertical-user-stories-slicing-the-cake
Behavior Driven Development
Why Behavior Driven Design• Work is done from the perspective of the  user• Can slice vertically but narrowly• Tests behav...
Acceptance Tests vs. Unit and      Integration Tests
Acceptance Tests vs. Unit and          Integration Tests• Unit Tests confirm that you built it  right (INSIDE OUT)• Accepta...
Benefits•   Implementing changes more efficiently•   Quick feedback•   Higher product quality•   Less rework•   Better work...
• Describes how software should behave in plain text• Gherkin   – Usable in many different human languages   – Features ca...
Technology Stack• Cucumber - Domain Specification• Ruby, JRuby or .NET - map cukes to  application• UI testing framework - ...
Features
Who’s Using the System                         Features
Who’s Using the System                         What are they doing?                                Features
Who’s Using the System                         What are they doing?                          Why do they care?            ...
Scenarios• Features are defined by one or more  scenarios• Sequence of steps thru the feature that  exercises on path• Use ...
Scenarios
• Given - Sets up preconditions, or context, for the  scenario                                         Scenarios
• Given - Sets up preconditions, or context, for the  scenario• When - The action, or behavior, that we’re focused on     ...
• Given - Sets up preconditions, or context, for the  scenario• When - The action, or behavior, that we’re focused on• The...
Demonstration                32
Q&A                For more information...•   This Presentation on GitHub - https://github.com/shawnewallace/intro-to-atdd...
Shawn WallaceWork: shawn.wallace@centricconsulting.com    Personal: shawn@the-wallaces.net         Twitter: @ShawnWallace ...
Introduction to atdd
Introduction to atdd
Upcoming SlideShare
Loading in...5
×

Introduction to atdd

525

Published on

Introduces some agile concepts about work breakdown and vertical slicing. Spends some time talking about Acceptance Test Driven Design.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
525
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
10
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • There is a lot here for...\n\ndevs, qa, ba and project leadership\n\nMeant to wet your whistle.\n
  • A few things about me.\n
  • A few things about me.\n
  • A few things about me.\n
  • A few things about me.\n
  • A few things about me.\n
  • A few things about me.\n
  • A few things about me.\n
  • A few things about me.\n
  • A few things about me.\n
  • A few things about me.\n
  • A few things about me.\n
  • A few things about me.\n
  • A few things about me.\n
  • A few things about me.\n
  • A few things about me.\n
  • A few things about me.\n
  • A few things about me.\n
  • A few things about me.\n
  • A few things about me.\n
  • I ‘fear the light’\n\nWhy do I care about this?\n
  • \n
  • our existences are about precise communication\n
  • \n
  • How many agilists in the room\n
  • Nothing about standups, iterations, product owners, \n\nPeople analyze agile by checking how many of these practices you have put in place.\n\nAlready, we have lost our way.\n
  • The ceremony has become our goal\n
  • The ceremony has become our goal\n
  • Not about process, not about ceremony, about delivering working software\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Consider the ATM problem\n
  • Thinking about how to break apart a backlog into vertical slices requires us to step outside the understanding of the code and implementation and instead think about the backlog in small pieces of working functionality.\n
  • \n
  • \n
  • \n
  • IT needs to be able to move faster than the business must make decisions\n Tests from the perspective of the user\n Tests behavior of the system\n Executable requirements, codefied\n not disposable artifacts\n
  • TESTING IS PART OF REQUIREMENTS GATHERING\n TDD is a development practice\n These are fairly accurate ratios\n
  • \n
  • \n
  • \n
  • \n
  • Within the definition of a feature you can provide a plain text description of the story, focusing on three important questions:\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • And can be used in any of the three sections\n It serves as nice shorthand for repeating the Given, When, or Then\n And stands in for whatever the most recent explicitly named step was\n
  • \nRuby and .NET\n
  • \nRuby and .NET\n
  • \nRuby and .NET\n
  • \nRuby and .NET\n
  • \nRuby and .NET\n
  • \nRuby and .NET\n
  • \nRuby and .NET\n
  • \nRuby and .NET\n
  • 1) show feature code\n2) show features run\nRED IS BAD\nYELLOW IS NOT IMPLEMENTED\nGREEN IS GOOD\n3) show feature output\n
  • \n
  • \n
  • \n
  • Transcript of "Introduction to atdd"

    1. 1. An Introduction to Behavior Driven Design Shawn Wallace National Service Offering LeadApplication Development and Application Lifecycle Management Senior Architect Centric Consulting
    2. 2. I’m Shawn
    3. 3. I’m ShawnFavorite Movie
    4. 4. I’m ShawnFavorite MovieMy dog
    5. 5. I’m ShawnFavorite MovieMy dogMy Son
    6. 6. I’m ShawnFavorite MovieMy dogMy SonMy Daughter
    7. 7. I’m ShawnFavorite MovieMy dogMy SonMy DaughterMy Family
    8. 8. I’m ShawnFavorite MovieMy dogMy SonMy DaughterMy FamilyI live here
    9. 9. I’m ShawnFavorite MovieMy dogMy SonMy DaughterMy Family I live hereI a Marine Vet
    10. 10. I’m ShawnFavorite MovieMy dogMy SonMy DaughterMy Family I live hereI a Marine VetMy Favorite Team
    11. 11. I’m ShawnFavorite MovieMy dogMy SonMy DaughterMy Family I live hereI a Marine VetMy Favorite TeamWhere I work
    12. 12. I’m not a BA
    13. 13. A programmer is going out for a stroll oneevening. His wife asks him to swing by thestore and pick up a gallon of milk, and if theyhad eggs, to get a dozen. He returned withtwelve gallons of milk and said "They hadeggs." 4
    14. 14. 5
    15. 15. Our existences are about precise communication
    16. 16. The Problem with Agility
    17. 17. We are trying to “productize” our approaches...again.
    18. 18. We are trying to “productize” our approaches...again.
    19. 19. Fundamentally agileis aboutapproaching thework in a differentway. 11
    20. 20. 12
    21. 21. We need thinkingbusiness analysts
    22. 22. 14
    23. 23. 15
    24. 24. We’re not building a house...
    25. 25. We’re cleaning the house...
    26. 26. It’s NOT easy• It is MUCH easier to slice up a backlog horizontally• Developers want to work horizontally (efficiency argument) http://simpleprogrammer.com/2011/11/21/understanding-the-vertical-slice/
    27. 27. http://www.deltamatrix.com/2012-04-17-04-37-50/horizontal-and-vertical-user-stories-slicing-the-cake
    28. 28. Why vertical slices?It is about delivering working functionality as soon as possible. Feedback.
    29. 29. http://www.deltamatrix.com/2012-04-17-04-37-50/horizontal-and-vertical-user-stories-slicing-the-cake
    30. 30. Behavior Driven Development
    31. 31. Why Behavior Driven Design• Work is done from the perspective of the user• Can slice vertically but narrowly• Tests behavior of the system• Executable requirements• Need to move as fast as business• Appropriate feedback loop• Manual regression is EXPENSIVE
    32. 32. Acceptance Tests vs. Unit and Integration Tests
    33. 33. Acceptance Tests vs. Unit and Integration Tests• Unit Tests confirm that you built it right (INSIDE OUT)• Acceptance Tests confirm that you build the right thing (OUTSIDE IN) 25
    34. 34. Benefits• Implementing changes more efficiently• Quick feedback• Higher product quality• Less rework• Better work alignment to priority (not just for agile teams) 26
    35. 35. • Describes how software should behave in plain text• Gherkin – Usable in many different human languages – Features can be written and understood by both non/ technical project members• Not a replacement for unit testing; it’s not a low level testing/spec framework• Easy to execute in Continuous Integration environment (except MS TFS)
    36. 36. Technology Stack• Cucumber - Domain Specification• Ruby, JRuby or .NET - map cukes to application• UI testing framework - Watir, Watin, Selenium, Capybara (headless), anything that supports WebDriver• Open source• STRONG community support 28
    37. 37. Features
    38. 38. Who’s Using the System Features
    39. 39. Who’s Using the System What are they doing? Features
    40. 40. Who’s Using the System What are they doing? Why do they care? Features
    41. 41. Scenarios• Features are defined by one or more scenarios• Sequence of steps thru the feature that exercises on path• Use BDD style – given-when-then Scenario: <description> <step 1> …
    42. 42. Scenarios
    43. 43. • Given - Sets up preconditions, or context, for the scenario Scenarios
    44. 44. • Given - Sets up preconditions, or context, for the scenario• When - The action, or behavior, that we’re focused on Scenarios
    45. 45. • Given - Sets up preconditions, or context, for the scenario• When - The action, or behavior, that we’re focused on• Then - Checks post-conditions and verifies that the right thing happened in the When stage Scenarios
    46. 46. Demonstration 32
    47. 47. Q&A For more information...• This Presentation on GitHub - https://github.com/shawnewallace/intro-to-atdd.git• cukes.info• Gojko Adzic – cuke4ninja.com – Specification by Example• https://github.com/aslakhellesoy/cucumber/wiki• http://groups.google.com/group/cukes• http://www.cheezyworld.com• The Cucumber Book, Matt Wayne, Aslak Hellesøy: http://pragprog.com/book/ hwcuc/the-cucumber-book• The Rspec Book, David Chelimsky: http://www.pragprog.com/titles/achbd/the- rspec-book• http://simpleprogrammer.com/2011/11/21/understanding-the-vertical- slice/• http://www.deltamatrix.com/2012-04-17-04-37-50/horizontal-and- vertical-user-stories-slicing-the-cake
    48. 48. Shawn WallaceWork: shawn.wallace@centricconsulting.com Personal: shawn@the-wallaces.net Twitter: @ShawnWallace Blog: blog.shawnewallace.com http://www.about.me/shawnwallace Shirt size: XXL Shoe Size: 11.5
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×