Michael Charland

Swift Developer

Home

BDD

Published Jul 10, 2017

I’m inexperienced with BDD and thought that writing a short article about it would help me better understand it and at the same time provide some useful information for anybody reading it. This article focuses on BDD with Cucumber as it’s what I’m currently investigating.

History

I’ve heard the term BDD before and I know what it means. I think it’s pretty straight forward, here is a short outline of how it works:

  • Working with a customer you work together to create some requirement docs. These docs are written in a customer friendly language using a specific syntax (Given, When, Then)
  • The docs are then parsed by Cucumber to create methods in your code.
  • The developers then implement the functionality.

That’s it. Since the docs are tied to both the customer and the developers they become a living specification. Any changes in the docs might require new code which is something I think is awesome.

You can always go back to the requirement docs and they should reflect the current state of the system. I’m sure this is more of a blue sky perspective, but some organizations must be able to get it to work for them.

I also played around with FitNesse years ago after listening to an Uncle Bob talk. I created a simple project and I wrote some requirements for it.

Motivation

There is a local company looking for a person with Calabash Cucumber skills so I’m diving back into BDD. I miss the mobile space as I worked in it for 7 years ending about 4 years ago. Also learning a new skill is always beneficial, the skills I’m working on are BDD (obviously), Cucumber, Calabash-iOS, and Ruby. What I’m doing about it

I’ve now devouring the Cucumber for Java book. I should also read the original book as I’m focusing on the iOS side and it uses Ruby to communicate from Cucumber to Objective-C. But my bread and butter for a programming language is Java, so I didn’t want to introduce too many variables at once. Also I’ve been watching some Calabash and Cucumber videos and listening to some podcasts.

Questions

Are you one of 3 amigos? How does and doesn’t BDD work for you? What do you like about? What don’t you like about it? Recommended reading / training / videos? I’m looking at getting a really good grasp of the area and any help is greatly appreciated.