Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
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

658 views

Published on

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

Published in: Technology
  • Be the first to comment

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

×