Behavior-driven development: Five tips for keeping BDD projects on track

Many organizations are approaching software design in a new way, with one of the most popular being Behavior-driven development (BDD). Here are five tips to keep your BDD projects on track

Behavior-driven development is fast becoming a preferred method of software development for projects both large and small. John Smart, author of the book BDD in Action: Behavior-Driven Development for the Whole Software Lifecycle, offers a straightforward explanation of this technique. "BDD is an approach where you specify and design an application by describing its behavior from the outside." 

BDD is an approach where you specify and design an application by describing its behavior from the outside.

John Smart, author of Jenkins: The Definitive Guide

The benefits of behavior driven development are many. Here are just a few:

  1. The process itself is lean since there's no tolerance for gold-plating
  2. It's highly fluid and can evolve to meet emerging requirements
  3. It encourages good communication with stakeholders
  4. It helps ensure the delivery of a product that really works

This outside-in development method can require some changes in how software designers and developers think about projects. Here are five quick tips for getting BDD right.

  1. Determine the requirements by having stakeholders describe how they expect the system to behave. Agree on concrete examples of what this would look like in real life scenarios to flush out incorrect assumptions.
  2. Turn the stakeholder's examples into acceptance criteria that define what is developed. Then, automate these acceptance criteria.
  3. Think of each layer of code as a client for another layer of code.  A class that calls another class should be defined by its desired behavior. Turn these requirements into unit tests that are also described in terms of behavior.
  4. Ensure everything that's built contributes to implementing the expected behavior. Nip any fluff in the bud so all resources are directed toward meeting acceptance criteria.
  5. Create a continuous feedback look from the business to automated tests and back to the business in the form of test reports. When possible, make sure these reports are based on the original examples so stakeholders can see their goals being met.

And with these tips in mind, you can put behavior-driven design in action yourself!

What is your experience like with BDD? Let us know.

This was last published in December 2014

PRO+

Content

Find more PRO+ content and other member only offers, here.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchCloudApplications

SearchSoftwareQuality

SearchFinancialApplications

SearchSAP

SearchManufacturingERP

DevOpsAgenda

Close