Behaviour Driven Development by Liz Keogh

1,135 views
1,058 views

Published on

BDD is a technique for helping team members collaborate and discover requirements in their project. It uses examples to illustrate the intended behavior of systems before they're implemented, so that the team can discover more examples and develop a shared understanding of the requirements. In this talk Liz will show why conversations are the most important aspect of BDD, how examples can help you discover things early, and why discovery is an inevitable part of software development.

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,135
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Behaviour Driven Development by Liz Keogh

  1. 1. Liz Keogh@lunivore
  2. 2. BDD uses examples to illustrate behaviour Conversations are the most important aspect Examples can help you discover things earlySometimes you discover that you don’t know
  3. 3. An Example of an ExampleGiven Fred has bought a microwave And the microwave cost £100 When we refund the microwaveThen Fred should be refunded £100.
  4. 4. Examples Given a context When an event happensThen an outcome should occur
  5. 5. CucumberFeature: Addition In order to avoid silly mistakes This is what most people As a math idiot I want to be told the sum of two numbers associate with BDD Scenario: Add two numbers Given I have entered 50 into the calculator And I have entered 70 into the calculator Then the result should be 120 on the screen
  6. 6. Having conversations
  7. 7. Boring! Given Fred bought a microwave And has receipt number 1857123 And receipt 1857123 list it at £100 When we scan the receiptThen the screen should show the list of items When we select the microwave And we refund it And scan Fred’s credit card Then Fred should be refunded £100.
  8. 8. Examples Given a context When an event happensThen an outcome should occur
  9. 9. Make sure you get it rightAssume you got it wrong
  10. 10. Is there a context in which this event will create a different outcome?
  11. 11. Examples Given Fred has bought a microwave And the microwave cost £100And the microwave was on 10% discount When we refund the microwave Then Fred should be refunded £90.
  12. 12. Is this the only outcome that matters?If we could achieve it with pixies, would it be enough?
  13. 13. ExamplesGiven Fred has bought a microwave And the microwave cost £100 When we refund the microwave Then the microwave should be added to the stock count.
  14. 14. And you can keep going…Given Fred has bought a microwave And the microwave cost £100 And the microwave is faulty When we refund the microwaveThen a fault ticket should be printed.
  15. 15. Liz Keoghhttp://lizkeogh.com@lunivore

×