Showing posts with label behaviour driven development. Show all posts
Showing posts with label behaviour driven development. Show all posts

Friday, 20 November 2015

A BDD lesson from my past - Part One

So, a few years ago I was involved in an agile transformation.
I was part of the consultancy brought in to work with a client.
As part of our learning through trial and error, we decided to try Behaviour Driven Development.
I wanted to learn from what we went through and share it with others.
I also wanted to learn what some of the people on the client site learned.
I worked with two separate people and we came up with 2 talks.
We worked with the same theme but taking their different experiences and personalities we created different talks.
It worked quite well.
Thanks to @andrewjutton and @brightoniant for joining me on this exercise and also being willing to go through their first presentation experience with me.
Recently @friendlytester wrote a post which reminded me of that time.
His post prompted me to write this post.
Are you sitting comfortably? Good. Then we'll begin.

Many moons ago, a few people came across SpecFlow and this lead them to Behaviour Driven Development.
We didn't spend time thinking through exactly what we wanted to achieve, or how we'd know if we were getting there.
SpecFlow, however, was shiny and new and we were still working on how exactly we were going to use automation in testing. 
We were lucky that people with the business knowledge were available.
We were unlucky in that the people with business knowledge were offsite most of the time.
We decided to trial BDD, which was driven by the tool and by the 'Software makers', which at the time did not include anybody from the business.
This (now) seems wrong and didn't work as effectively as it could have.
I have no evidence to back this up, but I believe that having the business suggest the idea of BDD would change the approach completely. 
BDD is about focusing on collaboration, not focusing on a tool.
You can work with BDD without ever using automation and receive plenty of value.
In-some cases you'll be better off as you won't get lost in the tool and focus on the collaboration.
Collaboration is the key and point.

So, there we were; Giving it, Whening it and Thening like mad.
Mostly written (solely) by the Business Analysts and therefore bypassing a shared understanding and attempting to share one person's understanding.
Here's an example:
Scenario: Display ‘Insurer Selection’ screen

Given that Insurer selection screen has been invoked
When the Insurer selection UI is rendered
Then the ‘Insurer Selection’ page is displayed
And the ‘Risk Variation Name’ field is displayed
And the ‘Risk Variation Name’ field is selected
And the ‘Customer Name’ is displayed
And only breadcrumb ‘Select Insurer’ is displayed
And all insurers setup in the system for the policy type are displayed
And all insurers setup in the system for the policy type are not selected
And the ‘Next’ button is disabled
We were learning.
We hadn't quite grasped yet that the how wasn't important, it's the what that is important.
What is actually trying to be completed?
End of part one.

Thursday, 5 September 2013

BDD Lessons Learned - Skillsmatter skillscast

Recently I presented a talk with my colleague Ant on some lessons learned around working with BDD.

The podcast is here



A discussion on what can cause some issues when implementing BDD taken from personal experience.
Things like, in no particular order:
  • Don’t rush into automation
  • Don’t spend hours arguing about the correct language to use
  • See what others are doing
  • Write scenarios as a team
  • Have the conversation
  • Don’t add implementation details in scenarios
  • Add tests to continuous integration process as early as possible
  • Use your scenarios
  • Include the SME (Subject Matter Expert)
  • domain expert and customer
  • Keep scenarios precise
  • Use examples to reinforce the scenario
  • Every scenario is negotiable and is subject to change at any time
  • Your scenarios are your living documentation
  • Make things visual
  • Sign off scenarios
  • Just do it.