Rinu Goldgin Dhanaraj

Software Consultant

BDD

Behavior Driven Development

So what is BDD?
 
    • It is a way to describe desired feature functionality in a human readable fashion
    • It is always done from end-user perspective
    • Each of these user flows is called Scenario
    • We use steps to describe a user flow
    • Scenarios should be treated as Acceptance Criteria
    • Scenarios are used as test cases (Cucumber framework)
    • Us Gherkin language, an industry standard.
    • Each line starts with one of these keywords:
      • Feature, Given, When, Then , And, But, Background
Benefits of using BDD
 
    • Becomes a contract agreement between a team and business
    • Drives acceptance criteria documentation and validation
    • Forces team members to clearly define requirements and eliminate possible waste in development
    • Uses plain English language that is easily understood everyone
Stages of BDD
 
    •  Discovery
    • Formulation
    • Implementation
Teams of BDD
 
    •  Developer
      • Who can implement a requirement (code, UI, etc.)

    • Tester
      • Who can validate a requirement

    • Product Owner
      • Who can provide details for  a requirement

To summarize BDD is something helps you create a contract between various parties with the common agenda which could help in reducing dev cycles addressing issues.

eg of contract

Scenario: describe what user should be able/unable to do

Given some initial application state

When I perform some action

And I perform another action

Then I (should|should not) see some change

And I (should|should not) see another change

 

Next Article