learning from mistakes with bdd

18
Learning from @tonybruce77 and @andrewjutton mistakes with BDD

Upload: tonybruce

Post on 19-Jul-2015

729 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Learning from mistakes with BDD

Learning from

@tonybruce77 and @andrewjutton

mistakes with BDD

Page 2: Learning from mistakes with BDD

Setting the scene

• Big Greenfield project.

• Transitioning the way we work in general.

• Introducing BDD.

Page 3: Learning from mistakes with BDD

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

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

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

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

5) Keep scenarios precise

• No one will read or understand a 20-30 line scenario.

Page 8: Learning from mistakes with BDD

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

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

8) Use your scenarios

• You’ve put the time in to write the scenarios, use them!

Page 11: Learning from mistakes with BDD

9) Every scenario is negotiable

• Everything is subject to change.

http://www.lastexittonowhere.com

Page 12: Learning from mistakes with BDD

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

11) Living Documentation

• Make this available to the whole business.

Page 14: Learning from mistakes with BDD

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

13) See what others are doing

• That’s why we’re all here.

Page 16: Learning from mistakes with BDD

14) Have the conversation!

• Get the whole team in a room and just talk through the requirements.

Page 17: Learning from mistakes with BDD

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

Thank you