Specification by Example (methoden, technieken en tools) Remco Snelders Product owner & Business analyst
Terminologie Specification by Example (SBE) Acceptance Test Driven Development (ATDD) Behaviour Driven Development (BDD) 3
Klein Tilburgs gezin 4
Opvallende observaties in het vliegtuig 5
Opvallende analyses op het strand 6
Specification by Example (SBE) @ 7
Het scrum team 8
Bol.com heeft 25% tijd bespaard door Specification by Example te implementeren Van: Naar: Business & IT praten langs elkaar heen. We begrijpen elkaar. Shared understanding Een user story is een businessdocument! Denken in oplossingen. Een user story is een samenwerkingsdocument. Teamleden worden in het verhaal meegenomen! Regressietest duurt 3 dagen. De regressie test duur nog maar 1 dag! Testen Veel te veel kans op fouten Testen zijn veel minder fout gevoelig 25% Effectiever We kunnen niet veel functionaliteit beheren! We kunnen veel meer functionaliteit aan! Documentatie Niemand gebruikt het! De testen spreken de waarheid! De code klopt! Documentatie = gratis 9
Wat is SBE? SBE riep weerstand op bij zowel de Business als de IT afdeling Het gaat toch goed zo! Dit kost te veel tijd! Ik ben toch geen tester! We doen dit al! 10
Why? Requirement levels Impact, Goal Deliverable, Outcome Impact mapping Story mapping User Activity Epic Isolated, formalized example User Story Acceptance criterion Bug report How? Example Code Easier to define upfront Harder to define upfront 12
Collecting acceptance criteria As a potential customer I want to collect books in a shopping basket So that I can order several books at once Imagine the story is already implemented: What would you try out? I would try to put a book into the shopping basket I would try to remove a book from the shopping basket I d check whether the shopping basket is empty, when I enter the shop I would try to add the same book again to the shopping basket Books can be placed into shopping basket. Books can be removed from shopping basket. Shopping basket should be empty when entering the shop. The same book can be add multiple times to the shopping basket. 13
Discussion of acceptance criteria 14
Examples Make abstract descriptions better understanding 15
Discussion of acceptance criteria 16
Discover new aspects Given the user has not ordered yet When the user adds a book with the price of euro 37.50 into the shopping cart. Then the shopping cart sub-total should be euro 33.75. 17
Collaboration: 3 amigo s 18
Example user story Title: Describes a focused intention/abstract acceptance situation As a potential Arrange: customer context, initial state of the system I want to collect books in a shopping basket So that I can order several Act: books Execution at once of the feature Assert: Assertion of observable behavior Books can be placed into shopping basket. The same book can be add multiple times to the shopping basket. Checks Books van be removed from shopping basket. Given my shopping basket is empty Given my shopping basket contains 1 copy of Harry Potter When I add the book Harry Potter to my shopping basket Shopping basket should be empty when entering the shop. Then my shopping basket should contain 21 copies copy of of Harry Potter The same book can be add multiple times to the shopping basket. 19
Het proces binnen bol.com Brainstorm session Prepare marketplace Marketplace Flipover / Smartboard Active attitude Scoping Purpose user-stories Team + stakeholders Examples in user-stories Key examples (test cases) Team + stakeholders Business goals Prepare examples (test cases) Adding examples (test cases) Poker 20
De inhoud van een user story Doel Scope Tests Implementation notes 21
As a private and business seller I want to hide the information banner So that the order page is clear Imagine the story is already implemented: What would you try out? I d check whether the banner is on the page, when I enter the order page The banner must be visible when entering the order page for the first time. I would try to click on niet meer tonen I d check whether the banner is gone, when I click on niet meer tonen and enter the order page I would try to reset the banner after removing it I would try to click on Backspace and go back to the order page. The banner can be removed from the page. The banner should be gone when clicked on niet meer tonen and entering the order page. The banner should be visible when clicking on reset. The banner is gone when leaving the order page with the browser or backspace button. 22
As a private and business seller I want to hide the information banner So that the order page is clear Imagine the story is already implemented: What would you try out? The banner can be removed from the page. The banner should be gone when clicked on niet meer tonen and entering the order page. Given I enter the order Given page I enter and the click order on the page link niet meer tonen When I click When on the I link click Mijn on the aanbod link niet and meer return tonen the order page Then the banner disappears isn t visible 23
Living documentation 24