Top Banner
An introduction to Behavior-Driven Development - By Suman Guha
17

An introduction to Behavior-Driven Development (BDD)

Aug 19, 2014

Download

Engineering

Suman Guha

An introduction to Behavior-Driven Development, BDD, TDD, TFD, ATDD,
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: An introduction to Behavior-Driven Development (BDD)

An introduction to Behavior-Driven Development

- By Suman Guha

Page 2: An introduction to Behavior-Driven Development (BDD)

BDD not only helps you develop software correctly, but it ensures you develop the correct software.

Page 3: An introduction to Behavior-Driven Development (BDD)

As per McKinsey and Company and Oxford University Research States:

17% of software projects go so badly, they threaten the very existence of the

company.

The Problem

Page 4: An introduction to Behavior-Driven Development (BDD)

As per McKinsey and Company and Oxford University Research States:

On average, large IT projects run45% over budget and 7% over time,while delivering 56% less value than

predicted.

Page 5: An introduction to Behavior-Driven Development (BDD)

Software Development Success Is Thwarted By The Requirements Gap

Page 6: An introduction to Behavior-Driven Development (BDD)

Test-Driven Development (TDD) ensures that you built the software correctly, Not that the correct

software was built.

Page 7: An introduction to Behavior-Driven Development (BDD)

The Problem

What thecustomer wanted

What theanalyst

specified

What thedevelopers

programmed

What was released after cost overturns

Page 8: An introduction to Behavior-Driven Development (BDD)

Defects found and remedied early in the software development life cycle reduce development costs

and save time.

Page 9: An introduction to Behavior-Driven Development (BDD)

Stone Age Practice: Traditional QA

QA Testing Establishes Tests That Typically Measure Software’s Adherence to Documented Requirements

Page 10: An introduction to Behavior-Driven Development (BDD)

Modern Recipe: Acceptance Test-Driven Development

Acceptance Test-Driven Development establishes a feedback loop that assures adherence to customer requirements

Page 11: An introduction to Behavior-Driven Development (BDD)

Ultra Modern Recipe: Behavior-Driven Development

Behavior-Driven Development codifies customer requirements into scenarios that are automated in a TDD test-first iteration and output test reports as part of a continuous build integration cycle

Page 12: An introduction to Behavior-Driven Development (BDD)

Ultra Modern Recipe: Behavior-Driven Development

Behavior-Driven Development codifies customer requirements into discrete, real-life scenarios that are automated in testing frameworks and output test reports as part of a continuous integration pipeline.

Page 13: An introduction to Behavior-Driven Development (BDD)

Sample

Feature: get cash from an ATM

Background:

Given the ATM has 1000

And the user John is authenticated

And the user's account has 5000

Scenario: success

When the user asks the ATM for 500

Then the ATM will have 500

And the user's account will have 4500

And the ATM will provide 500 in cash

Scenario: not enough money in the ATM

When the user asks the ATM for 1500

Then the ATM will have 1000

And the user's account will have 5000

And the ATM will notify the user it does not have enough cash

Page 14: An introduction to Behavior-Driven Development (BDD)

What needs to happen

Three disciplines recommended by the development community, Test-Driven Development, Behavior-Driven Development and Domain-Driven Design

Page 15: An introduction to Behavior-Driven Development (BDD)

Hybrid Practice

Page 16: An introduction to Behavior-Driven Development (BDD)

Hybrid practice

The intersection of TDD, DDD and BDD provide an

hybrid approach to development which

assures predictable and productive outcome.

Page 17: An introduction to Behavior-Driven Development (BDD)

Waterfall SDLC vs Test-First with BDD

Integrating Disciplined Testing Through BDD Reduces The “Testing Tail” and Avoids Late Surprises