Learning from mistakes with BDD
-
Upload
tonybruce -
Category
Technology
-
view
729 -
download
0
Transcript of Learning from mistakes with BDD
![Page 1: Learning from mistakes with BDD](https://reader030.fdocuments.in/reader030/viewer/2022032617/55aab9a61a28ab993b8b4788/html5/thumbnails/1.jpg)
Learning from
@tonybruce77 and @andrewjutton
mistakes with BDD
![Page 2: Learning from mistakes with BDD](https://reader030.fdocuments.in/reader030/viewer/2022032617/55aab9a61a28ab993b8b4788/html5/thumbnails/2.jpg)
Setting the scene
• Big Greenfield project.
• Transitioning the way we work in general.
• Introducing BDD.
![Page 3: Learning from mistakes with BDD](https://reader030.fdocuments.in/reader030/viewer/2022032617/55aab9a61a28ab993b8b4788/html5/thumbnails/3.jpg)
1) Write scenarios as a team
• Don’t get one person to write them! It’s not all about one persons view.
Scenario: Select InsurerGiven that an insurer is not selectedWhen that insurer is selectedThen that insurer is displayed as selected
Scenario: Deselect InsurerGiven that an insurer is selectedWhen that insurer is deselectedThen that insurer is displayed as deselected
![Page 4: Learning from mistakes with BDD](https://reader030.fdocuments.in/reader030/viewer/2022032617/55aab9a61a28ab993b8b4788/html5/thumbnails/4.jpg)
2) Include the SME’s, domain experts and customers
• These guys understand the problem domain more than anyone.
![Page 5: Learning from mistakes with BDD](https://reader030.fdocuments.in/reader030/viewer/2022032617/55aab9a61a28ab993b8b4788/html5/thumbnails/5.jpg)
3) Don’t spend hours arguing about the correct language to use
• Try and land a few ground rules early.
![Page 6: Learning from mistakes with BDD](https://reader030.fdocuments.in/reader030/viewer/2022032617/55aab9a61a28ab993b8b4788/html5/thumbnails/6.jpg)
4) Don’t include implementation details in scenarios
• Avoid tying scenarios to the UI by referencing page elements or controls.
Scenario: Display ‘Insurer Selection’ screenGiven that Insurer selection screen has been invokedWhen the Insurer selection UI is renderedThen the ‘Insurer Selection’ page is displayedAnd the ‘Risk Variation Name’ field is displayedAnd the ‘Risk Variation Name’ field is selectedAnd the ‘Customer Name’ is displayedAnd only breadcrumb ‘Select Insurer’ is displayedAnd all insurers setup in the system for the policy type are displayedAnd all insurers setup in the system for the policy type are not selectedAnd the ‘Next’ button is disabled
![Page 7: Learning from mistakes with BDD](https://reader030.fdocuments.in/reader030/viewer/2022032617/55aab9a61a28ab993b8b4788/html5/thumbnails/7.jpg)
5) Keep scenarios precise
• No one will read or understand a 20-30 line scenario.
![Page 8: Learning from mistakes with BDD](https://reader030.fdocuments.in/reader030/viewer/2022032617/55aab9a61a28ab993b8b4788/html5/thumbnails/8.jpg)
6) Don’t rush into automation
• It’s not all about the tool and automated tests can be a big overhead.
![Page 9: Learning from mistakes with BDD](https://reader030.fdocuments.in/reader030/viewer/2022032617/55aab9a61a28ab993b8b4788/html5/thumbnails/9.jpg)
7) Execute the tests as part of your CI process as early as possible
• Get the tests running as part of the build as soon as possible, this keeps the test alive.
![Page 10: Learning from mistakes with BDD](https://reader030.fdocuments.in/reader030/viewer/2022032617/55aab9a61a28ab993b8b4788/html5/thumbnails/10.jpg)
8) Use your scenarios
• You’ve put the time in to write the scenarios, use them!
![Page 11: Learning from mistakes with BDD](https://reader030.fdocuments.in/reader030/viewer/2022032617/55aab9a61a28ab993b8b4788/html5/thumbnails/11.jpg)
9) Every scenario is negotiable
• Everything is subject to change.
http://www.lastexittonowhere.com
![Page 12: Learning from mistakes with BDD](https://reader030.fdocuments.in/reader030/viewer/2022032617/55aab9a61a28ab993b8b4788/html5/thumbnails/12.jpg)
10) Use examples to reinforce the scenarios
• Examples bring scenarios to life! They make them dynamic and they provide test data to verify that the scenario meets it’s goal.
![Page 13: Learning from mistakes with BDD](https://reader030.fdocuments.in/reader030/viewer/2022032617/55aab9a61a28ab993b8b4788/html5/thumbnails/13.jpg)
11) Living Documentation
• Make this available to the whole business.
![Page 14: Learning from mistakes with BDD](https://reader030.fdocuments.in/reader030/viewer/2022032617/55aab9a61a28ab993b8b4788/html5/thumbnails/14.jpg)
12) Drive the sprint review meeting through the scenarios
• A story may only be considered complete when all your scenarios have been implemented.
![Page 15: Learning from mistakes with BDD](https://reader030.fdocuments.in/reader030/viewer/2022032617/55aab9a61a28ab993b8b4788/html5/thumbnails/15.jpg)
13) See what others are doing
• That’s why we’re all here.
![Page 16: Learning from mistakes with BDD](https://reader030.fdocuments.in/reader030/viewer/2022032617/55aab9a61a28ab993b8b4788/html5/thumbnails/16.jpg)
14) Have the conversation!
• Get the whole team in a room and just talk through the requirements.
![Page 17: Learning from mistakes with BDD](https://reader030.fdocuments.in/reader030/viewer/2022032617/55aab9a61a28ab993b8b4788/html5/thumbnails/17.jpg)
Summary
• Started to write the scenarios more collaboratively as a team.
• We are learning from mistakes– The language evolves, it is not instant
• More developers are more interested– Slowly more examples being written
• Working together more– Business getting move involved
• Helps clear up miscommunication and ambiguity• Can add value without the automation
– Slowly adding more automation
• Helps enable teamwork
![Page 18: Learning from mistakes with BDD](https://reader030.fdocuments.in/reader030/viewer/2022032617/55aab9a61a28ab993b8b4788/html5/thumbnails/18.jpg)
Thank you