Are you ready for the behavior-driven development (BDD) ?

Are you ready for the behavior-driven development (BDD) ?

In software development, behavior-driven development (BDD) is an agile development process that encourages collaboration among developers, QA and non-technical or business participants in a software project.

It is derived from TDD approach i.e. test-driven development, where test cases or unit test cases are written by Dev/QA teams before the development begins and once development is done, these test cases or unit test cases are run, if these test cases are pass then your development is completed else it’s not ready yet.

But in behavior-driven development (BDD), instead of test cases by Dev/QA team the focus shifts to the behavior, here stake holders (Business team) writes expected behavior in simple English language, which later becomes,

-         Requirements for Product Owners / Project Managers.

-         Acceptance criteria for the Development team.

-         Test Cases for Testing team.

Any stake holder or Business team can specifies desired behavior in following format:-

Title - An explicit title.

Narrative - A short introductory section with the following structure:

·        As a: the person or role who will benefit from the feature;

·        I want: the feature;

·        so that: the benefit or value of the feature.

Acceptance criteria - A description of each specific scenario of the narrative with the following structure:

·        Given: the initial context at the beginning of the scenario, in one or more clauses;

·        When: the event that triggers the scenario;

·        Then: the expected outcome, in one or more clauses.

For example:-

Title: Returns and exchanges go to inventory. 

As a store owner, I want to add items back to inventory when they are returned or exchanged, so that I can track inventory.

 Scenario 1: Items returned for refund should be added to inventory.

Given that a customer previously bought a black sweater from me

and I have three black sweaters in inventory,

when they return the black sweater for a refund,

then I should have four black sweaters in inventory.

We can say , using behavior-driven development (BDD), both technical and non-technical members have active participation in the software development life cycle and there will be no deviation in behavior of the software during development. In the earlier approaches as there are multiple level of layers so there might be chances of deviation.

No alt text provided for this image

But here in (BDD), whole team can start working on as they get features written in simple English language from business team. So business team and other stake holders also have active participation in the development of the software.

No alt text provided for this image


To view or add a comment, sign in

More articles by Rohit Rampal

  • Dear Machine, Welcome to the team !

    In this era of technological revolution, a small change in technology may create a huge impact on our lives. Decades…

    1 Comment

Others also viewed

Explore content categories