BT

Experiences with Behaviour-Driven Development

| by Jan Stenberg Follow 34 Followers on Sep 09, 2016. Estimated reading time: 2 minutes |

Behaviour-Driven Development (BDD) recognizes that software development is fundamental to business of today and helps to improve communication between business stakeholders and software developers, Kevin Smith claims in a recent blog post about his experiences working with BDD.

After many years of running agile projects, Smith, Technical Director and Co-founder of Dootrix, has noticed a few general shortcomings:

  • With user stories’ focus on the user and what she is trying to achieve it’s easy to forget about the business needs.
  • User stories are short-lived, making it easy to forget about the overall specification of an application.
  • Acceptance criteria, based on user stories, are often of too low quality, among other things due to user stories being short-lived.
  • The agile toolbox lack tools which help to find the business problems that need to be solved.
  • Test-driven development (TDD) is commonly used today, but too often these tests only verify the details, not that features are correctly implemented.

In Smith’s experience, BDD helps in solving these issues, especially by introducing concepts like Specification by example and Impact mapping.

One simple change Smith has implemented is changing the user story template to a more BDD-style form, which he thinks puts an increased focus on business value, ensuring that it's always discussed:

In order to <realize benefit> as a <role> I want <feature>

BDD emphasizes concrete examples to minimize ambiguity. These examples help in creating a common understanding as well as finding missing functionality, and can also be used when writing acceptance criteria, A formal language, Gherkin, can be used to write these examples which makes it possible to automatically run tests based on the examples.

A common challenge when building software is creating correct documentation. Since BDD has a focus on features with examples to explain the behaviour, it can be used for automating the documentation, which then will be in sync with the actual features implemented, often called living documentation.

Although Smith thinks that BDD has a lot offer, there is still some potential drawbacks to be aware of:

  • BDD is not about the user interface, so we still need to work with prototypes and other tools to ensure the interface is well designed.
  • There are many tools available for creating tests from the examples written, but there is a lack of tooling for managing which tests are run and when.
  • It can be hard to develop a good automated testing suite, and in the short term it is more expensive.

Smith concludes by noting that BDD is still a young idea and lacking the ecosystem that is found around agile. Still, he believes it's a step in the right direction, helping to improve the communication between people when building software. To emphasize what BDD is really about, he cites Dan North, who created BDD:

Above all BDD is a mechanism for fostering collaboration and discovery through examples.

 

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Do not forget use cases by Erik Gollot

Not surprising...Agilists forgot the UML usecases....they now realize that they need them

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

1 Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT