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.

Specification-by-example Workshop at LatCraft

702 views

Published on

In this workshop, you will learn Specification by Example – a modern, collaborative technique for crafting lucid requirements and functional tests using BDD. After the workshop, you will have a solid understanding what Specification by Example is about, why and when to use it, how it helps eliminate ambiguity in requirements and build shared understanding within the team. You will also see some tools in action like Cucumber and Spock. Everyone is welcome – developers, QA engineers, product and dev managers! No laptops needed!

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Specification-by-example Workshop at LatCraft

  1. 1. Specification by example Andrey Grave
  2. 2. About me - 15 years in software development - Various roles - Pl/SQL dev, System analyst, Java developer, Team lead ... - Various companies - government, outsourcing, product, startup
  3. 3. Agenda ● Intro into Specification by example ● Exercise ● Some more info ● Exercise ● Some more info ● Wrap up
  4. 4. Specification by example “Specification by Example is a set of process patterns that facilitate change in software products to ensure that the right product is delivered efficiently.” Gojko Adzic
  5. 5. Why? Advantages of specification by example ● Increased quality ● Reduced waste ● Reduced risk of production defects ● Focused effort ● Changes can be made more safely ● Improved business involvement ● Shared understanding
  6. 6. Specification by example - key process patterns
  7. 7. Our today focus ● Illustrate using examples ● Specify collaboratively ● Refining specification
  8. 8. Why examples? ● easier to understand ● harder to misinterpret ● we already use them
  9. 9. For example Imagine we are building affiliate management solution and we have following requirement: “Pay 2 EUR per 1000 clicks”
  10. 10. Group exercise Imagine You are working in a internet Amazon, and Jeff Bezos comes up to You and gives You following user story: “Hey, I want provide free delivery on books for our VIP customers”
  11. 11. Key example ● Outside-in ● Start with output ● Avoid making up your own data (ask customers instead) ● Look for implied concepts ● Examples should be easy to understand
  12. 12. Validating examples ● Use questions: ○ Complicated edge cases ○ Open ended questions (not yes/no) ○ Experiment with data ● Feedback exercise
  13. 13. Specification workshops ● Collaboration models ○ All team workshop ○ Three amigos ○ Pairing ○ … other ● Invite stakeholder (someone who controls money, and can make decisions)
  14. 14. Coming up with examples ● Happy path ● Edge cases ● Every acceptance criteria should have at least one example ● Play with outcomes ● Play with context ● It’s about examples You don’t know, not ones You know
  15. 15. Gherkin GIVEN - Context And [more context] WHEN - action And [other action] THEN - outcome And [more outcome]
  16. 16. Scenario Feature: Search feature for users This feature is very important because it will allow users to filter products Scenario: When a user searches, without spelling mistake, for a product name present in inventory. All the products with similar name should be displayed Given User is on the main page of www.myshopingsite.com When User searches for laptops Then search page should be updated with the lists of laptops
  17. 17. Scenario outline
  18. 18. Free delivery VIP
  19. 19. Good specifications ● Use Domain language ● Tangible, not abstract ● Explicit, not implicit ● Human readable ● Avoid GUI specifics
  20. 20. Life after workshop ● Automate ○ Try preserve business language ○ Plan up-front to automate ○ Treat automation code as first class citizen ● Validate frequently ○ Include in CI ○ Consider having an “sprint” test pack (valuable to show progress) ● Living documentation ○ Keep specifications as simple and short as possible ○ Organize specifications (by functionality) ○ Evolve specifications ○ Make documentation accessible (Relish docs)
  21. 21. Tool overview CONCORDION Robot Framework
  22. 22. Tool overview CEDAR RoboSpock
  23. 23. Summary ● Focus on collaboration and communication ● Don’t jump to implementation details ● Seek for missing business concepts ● Try it out!
  24. 24. “Having a conversation is more important than recording the conversation is more important than automating the conversation” Liz Koegh
  25. 25. Book recommendations

×