SlideShare ist ein Scribd-Unternehmen logo
1 von 48
Behavior Driven Development

           Ajay Danait

           Global Agile Strategist
      Stixis Technologies, Bangalore
Co-Learning (Collaborative Learning)

 Cross Functional Behavior (10 mins)

 Evolution of Software Development Process (15 mins)

 Behavior Driven Development (BDD) Concept (10 mins)

 Behavior Driven Development (BDD) Semantics (15 mins)

 Q & A (10 mins)
Quick Survey


While doing software
development, who do you think
like ...

Like a …
Plumber, Carpenter, Sculptor, Artist,
Blacksmith, Hairdresser, Firefighter,
Scientist, Archaeologist, Author, Typist
Not Designations … But Roles
          Switch Caps Not Wear Crowns



•   Architect
•   Artist
•   Craftsman
•   Planner
•   Team Player
•   Critic
•   Engineer
Team Organization and Governance
      Traditional Team Hierarchy (Crowns) vs. Cross-Functional Roles (Caps)
                             Project Leadership
                                                                                                  System
                                                                                                Architecture
Tech Architect                              Test Architect
                                                                                   Test                            Business
                                                                                 Creation                          Analysis
                          Data
    Tech Lead                                 Test Lead
                         Architect

                                                                                                 Facilitator
                                                                                                  Leader
             Designer                               Test Analyst                                   Guide
                                                                              Test                Coach               Project
                                                                           Automation                               Management
                                                  Automation Tester
             Developer


                                                                                          Build &
                                                                                                           Application
             Business                                                                     Release
                                                                                                          Development
              Analyst                                                                   Management



  Crowns                                                              Caps
     Creates and widens gap between people                              Swapped depending on situations
     Restricts knowledge sharing                                        Increase sense of collective ownership
     Builds up power distance                                           Rotation of responsibilities improves knowledge sharing
     Steep learning curve for increase in maturity                      Open culture within the team
Quick Opinion




 When do you say a software project has
               "failed" ?
Failure symptoms / Failure causes

Software delivered very late
... costed way more

... does the wrong thing

... unstable in production, crashes a lot

... code change breaks functionality

... new version cannot be released very often
Traditional Software Delivery Process
          Why Do We Do This ?
Inheriting Management Style from Traditional Industries
     Fredrick Taylor                              Edwards Deming / Taiichi Ohno
     Taylorism (Scientific Management)            Deming Cycle / Lean Thinking
       (Work Management separation)                 (PDCA-Plan-Do-Check(Study)-Act)
     Top Down
     People need to be “managed”,                 Bottom Up
      “controlled”, “monitored”.                   People want to do a good job and take
     Work needs to be made simple for              pride in creativity.
      them or they will make mistakes. The         People respond well to an encouraging
      people downstream are increasingly            environment of freedom and trust and
      dumb, pluggable / replaced. So, all the       hence produce better results.
      “smartness” needed is loaded upfront
      in the form of “well-documented              People stress a lot on gaining
      artifacts” – requirements, designs,           knowledge in the long term and improve
      user acceptance tests.                        their skills based on collaboration and
                                                    apprenticeship.
     Hence, there should be a proper
      knowledge transfer “handover”
      mechanism to make sure no data is
      lost in translation.
     Also to “verify” based on documented
      evidence whether there are mistakes
      in the work that they do.
Cost Of Change
Cost of Change from Traditional Industries
 Lack of trust downstream
 So we hedge
      Detailed functional requirements
      Big Design Up Front
      Detailed UAT
      Detailed Project Plan using Work Breakdown Structure until Task
       level
 Discovering a defect / unexpected behavior
    Causes increase in change and hence cost
 To prevent this, we hedge with the phased process
 We hedged so much to prevent high cost of change
  that we added steps that increase cost of change.
Cause-Effect Cause
Software Practices Inherited

•   V-Model Development Process
•   Upfront Detailed Planning
•   Fixed Scope Requirements (No changes)
•   Big Design Up Front
•   Hard Code (That cannot easily change)
•   Late Big Bang Integration
•   Limited Testing
•   Lots of handovers
•   Manual Deployments
•   Low Maintainability
Software Delivery – Done Differently                                            Vision Level

                                                                              Vision Statement
                    V-Model to I-Model                                              Goals
   (Changing a “waterfall” verification and validation testing mindset to
                spec-driven purpose fulfillment mindset)
                                                                             System / Product
                                                                                   Level

                                                                                Executable
                                                                               Specifications
                                                                                Acceptance




                                                                               Feature Level

                                                                            Domain Driven Design
                                                                               Architecture




                                                                                Story Level

                                                                               Interface Driven
                                                                             Evolutionary Design
                                                                                    Mocks
                                                                                  Integration




                                                                               Scenario Level

                                                                                 TDD / Unit
                                                                              Code-by-example
                                                                               Implementation
Levels of Planning
   Who?                        Executive Mgmt.
               Vision
   Why?                        Product Management

What?          Product           Product Owner
                                    Product Owner,
When?          Release
                                    Stakeholders,
                                    Team
How?           Iteration          Product Owner,
                                  Team


               Daily             Team
What is different ?

•   Deliver features instead of modules
•   Prioritize often, change often
•   Focus on high value features
•   Flatten the cost of change
•   Adapt to feedback
•   Fail fast, fail safe (Learn from failure)
•   Better Learning
•   Better collaboration than handover
Evolution of Software Practices

•   Adaptive Planning
•   Streamlined, Executable Specifications
•   Evolving Design (Just Enough Design)
•   Continuous Code Refactoring
•   Automated Acceptance Testing
•   Continuous Integration
•   Continuous Regression Testing
•   Continuous Automated Deployments
•   Highly Maintainable systems
BDD – Behavior Driven Development
Concept
• Behavior-Driven Development (BDD) is a
  term used to classify a method to build
  software by describing the application
  behavior from the perspective of and what is
  of value to the stakeholders.
• Other terms associated with same concept –
  o   Agile Acceptance Testing
  o   Acceptance Test-Driven Development
  o   Example-Driven Development
  o   Code By Example
  o   Story Testing
  o   Story Test-Driven Development
  o   Specification By Example
Communication Effectiveness

         2 people at
         white board


      2 people
     on phone
             2 people
             on email
                 Videotape
                             Audiotape   Document


            Form of Communication
Definition by Dan North (Creator of BDD)

“ Behavior-Driven Development (BDD) is a
second-generation, outside-in, pull-based,
multiple-stakeholder, multiple-scale, high-
automation, agile methodology.

It describes a cycle of interactions with well-
defined outputs, resulting in the delivery of
working, tested software. ”
Second-Generation


• Derived from TDD, Acceptance Test Driven
  Planning, Lean and Domain Driven Design

• Concepts of Neuro-Linguistic Programming
  (NLP) and Systems Thinking
Outside-In, Multiple-Scope,        Vision Level

                                        Vision Statement

        Multiple Stakeholders                Purpose




Who?                                   System / Product
                 Vision                       Level
Why?                                   Goals / Outcomes /
                                          Capabilities

                                       BDD Specifications

What?            Product
                                          Feature Level
When?            Release              Domain Driven Design
                                         Architecture



How?             Iteration
                                           Story Level

                                         Interface Driven
                                       Evolutionary Design
                                              Mocks


                  Daily
                                         Scenario Level

                                              TDD
                                        Code-by-example
                                         Implementation
Pull-based


• Just-enough details
• Diminishing returns
• Deliberate Discovery
Agile Methodology
BDD Principles

• Just Enough
• Deliver stakeholder value
• Behavior only
Key Process Patterns
User Story Template

As a [role]
I want [feature]
So that [benefit]

Title [title of the story]
In order to [benefit]
A [role]
Wants to [feature]
User Story Example
•   Title: Register customers for VIP program
    In order to be able to do direct marketing of products to
    existing customers,
    a marketing manager
    wants customers to register personal details by joining a VIP
    program.

•   Title: Free delivery for VIP customers
    In order to entice existing customers to register for the VIP
    program,
    a marketing manager
    wants the system to offer free delivery on certain items to VIP
    customers.
Scenario Template

Title [title of the scenario]
Given [some initial context / system State]
And [more context / system State]
When [an event occurs / user Action occurs]
Then [ensure outcome / system Reaction]
And [some outcomes / system Reactions]
Scenario Template
•   Title: Register customers for VIP program
    Given the customer registered for VIP program
    When the customer adds 5 books in the cart
    Then the customer gets free delivery


•   Title: Register customers for VIP program
    Given the customer registered for VIP program
    When the customer adds 4 books in the cart
    Then the customer does not get free delivery
    And the customer gets standard delivery


•   Title: Register customers for VIP program
    Given the customer registered for VIP program
    When the customer adds 5 washing machines in the cart
    Then the customer does not get free delivery
    And the customer gets standard delivery
User Story & Scenario Example
•   Title: Customer withdraws cash
    In order to not want to wait in line at the bank,
    a customer
    wants to withdraw cash from the bank ATM

•   Title: Account is in credit
    Given the account is in credit
    And the card is valid
    And the dispenser contains cash
    When the customer request for cash withdrawal
    Then ensure the account is debited
    And ensure the cash is dispensed
    And ensure the card is returned
User Story & Scenario Example
•   Title: Customer withdraws cash
    In order to not want to wait in line at the bank,
    a customer
    wants to withdraw cash from the bank ATM

•   Title: Account is overdrawn past the overdraft limit
    Given the account is overdrawn
    And the card is valid
    When the customer request for cash withdrawal
    Then ensure a rejection message is displayed
    And ensure the cash is not dispensed
    And ensure the card is returned
BDD Characteristics

• Ubiquitous Language
• Iterative Decomposition Process
• Plain text description using Story and
  Scenarios templates
• Automated Acceptance Testing with Mapping
  Rules
• Readable Behavior Oriented Specification &
  code
• Behavior Driven at different levels
BDD Conceptual Model




            - A Study of the Characteristics of Behavior Driven Development
                                          - by Carlos Solís & Xiaofeng Wang
Building The Right Product
Just-Enough Living Documentation
BDD Mind Map




               - by Dan North
BDD Tools

• JBehave, NBehave
• RSpec, MSpec
• StoryQ, Cucumber, SpecFlow
BDD Anti-Patterns
• BDD is a framework with keywords & flavors
• BDD is for defining system behavior and TDD
  for lower level components
• BDD is for business applications and TDD is
  for API libraries
• BDD is too explicit, verbose.
• BDD is for higher level, TDD is for lower level
• BDD is for integration testing, TDD is for unit
  testing
• BDD is outside-in, TDD is inside-out.
BDD comparison with Finite State Machine (FSM)


• Sequence Pattern      • Parallel Split Pattern
BDD comparison with Finite State Machine (FSM)


• Synchronization Pattern
BDD comparison with Finite State Machine (FSM)


• Exclusive Choice Pattern
BDD comparison with Finite State Machine (FSM)

• Simple Merge Pattern
BDD comparison with Finite State Machine (FSM)
• Multiple Choice Pattern
BDD comparison with Finite State Machine (FSM)


• Synchronization Merge Pattern
BDD comparison with Finite State Machine (FSM)
• Multiple Merge Pattern
Thank You

     Ajay Danait

     Global Agile Strategist
Stixis Technologies, Bangalore

Weitere ähnliche Inhalte

Was ist angesagt?

ATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven DevelopmentATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven DevelopmentNaresh Jain
 
What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...
What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...
What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...Simplilearn
 
Introduction to BDD
Introduction to BDDIntroduction to BDD
Introduction to BDDKnoldus Inc.
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOpsMatthew David
 
Agile Testing: The Role Of The Agile Tester
Agile Testing: The Role Of The Agile TesterAgile Testing: The Role Of The Agile Tester
Agile Testing: The Role Of The Agile TesterDeclan Whelan
 
Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICDKnoldus Inc.
 
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...Simplilearn
 
BDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world applicationBDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world applicationJohn Ferguson Smart Limited
 
Introduction to CI/CD
Introduction to CI/CDIntroduction to CI/CD
Introduction to CI/CDHoang Le
 
Agile Testing Framework - The Art of Automated Testing
Agile Testing Framework - The Art of Automated TestingAgile Testing Framework - The Art of Automated Testing
Agile Testing Framework - The Art of Automated TestingDimitri Ponomareff
 
TDD (Test Driven Design)
TDD (Test Driven Design)TDD (Test Driven Design)
TDD (Test Driven Design)nedirtv
 
Todas as abordagens de testes dentro do ágil
Todas as abordagens de testes dentro do ágilTodas as abordagens de testes dentro do ágil
Todas as abordagens de testes dentro do ágilElias Nogueira
 
BDD WITH CUCUMBER AND JAVA
BDD WITH CUCUMBER AND JAVABDD WITH CUCUMBER AND JAVA
BDD WITH CUCUMBER AND JAVASrinivas Katakam
 
Behavior Driven Development Pros and Cons
Behavior Driven Development Pros and ConsBehavior Driven Development Pros and Cons
Behavior Driven Development Pros and ConsIosif Itkin
 

Was ist angesagt? (20)

TDD and BDD and ATDD
TDD and BDD and ATDDTDD and BDD and ATDD
TDD and BDD and ATDD
 
Tdd and bdd
Tdd and bddTdd and bdd
Tdd and bdd
 
ATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven DevelopmentATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven Development
 
What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...
What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...
What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...
 
Introduction to BDD
Introduction to BDDIntroduction to BDD
Introduction to BDD
 
BDD with Cucumber
BDD with CucumberBDD with Cucumber
BDD with Cucumber
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
 
BDD and Behave
BDD and BehaveBDD and Behave
BDD and Behave
 
Agile Testing: The Role Of The Agile Tester
Agile Testing: The Role Of The Agile TesterAgile Testing: The Role Of The Agile Tester
Agile Testing: The Role Of The Agile Tester
 
Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICD
 
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
 
BDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world applicationBDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world application
 
Introduction to CI/CD
Introduction to CI/CDIntroduction to CI/CD
Introduction to CI/CD
 
Agile Testing Framework - The Art of Automated Testing
Agile Testing Framework - The Art of Automated TestingAgile Testing Framework - The Art of Automated Testing
Agile Testing Framework - The Art of Automated Testing
 
Gherkin /BDD intro
Gherkin /BDD introGherkin /BDD intro
Gherkin /BDD intro
 
TDD (Test Driven Design)
TDD (Test Driven Design)TDD (Test Driven Design)
TDD (Test Driven Design)
 
QA Best Practices in Agile World_new
QA Best Practices in Agile World_newQA Best Practices in Agile World_new
QA Best Practices in Agile World_new
 
Todas as abordagens de testes dentro do ágil
Todas as abordagens de testes dentro do ágilTodas as abordagens de testes dentro do ágil
Todas as abordagens de testes dentro do ágil
 
BDD WITH CUCUMBER AND JAVA
BDD WITH CUCUMBER AND JAVABDD WITH CUCUMBER AND JAVA
BDD WITH CUCUMBER AND JAVA
 
Behavior Driven Development Pros and Cons
Behavior Driven Development Pros and ConsBehavior Driven Development Pros and Cons
Behavior Driven Development Pros and Cons
 

Ähnlich wie Behavior Driven Development (BDD)

Session #1: Development Practices And The Microsoft Approach
Session #1: Development Practices And The Microsoft ApproachSession #1: Development Practices And The Microsoft Approach
Session #1: Development Practices And The Microsoft ApproachSteve Lange
 
Agile Developers Create Their Own Identity
Agile Developers Create Their Own IdentityAgile Developers Create Their Own Identity
Agile Developers Create Their Own IdentityAjay Danait
 
Agile developers create their own identity by Ajay Danait
Agile developers create their own identity by Ajay DanaitAgile developers create their own identity by Ajay Danait
Agile developers create their own identity by Ajay DanaitXebia IT Architects
 
Agile Requirements by Agile Analysts
Agile Requirements by Agile AnalystsAgile Requirements by Agile Analysts
Agile Requirements by Agile AnalystsKurt Solarte
 
Application Lifecycle Management & VSTS
Application Lifecycle Management & VSTSApplication Lifecycle Management & VSTS
Application Lifecycle Management & VSTSMicrosoft Iceland
 
An Introduction to Software Performance Engineering
An Introduction to Software Performance EngineeringAn Introduction to Software Performance Engineering
An Introduction to Software Performance EngineeringCorrelsense
 
Aras Innovator PLM Deployment Methodology
Aras Innovator PLM Deployment MethodologyAras Innovator PLM Deployment Methodology
Aras Innovator PLM Deployment MethodologyAras
 
IBM Rational Software Conference 2009 Day 1 Keynote: Jamie Thomas
IBM Rational Software Conference 2009 Day 1 Keynote: Jamie ThomasIBM Rational Software Conference 2009 Day 1 Keynote: Jamie Thomas
IBM Rational Software Conference 2009 Day 1 Keynote: Jamie ThomasKathy (Kat) Mandelstein
 
Agile Developers Create Their Own Identity[1]
Agile Developers Create Their Own Identity[1]Agile Developers Create Their Own Identity[1]
Agile Developers Create Their Own Identity[1]Surajit Bhuyan
 
Visual Studio Application Lifecycle Managment end-to-end
Visual Studio Application Lifecycle Managment end-to-endVisual Studio Application Lifecycle Managment end-to-end
Visual Studio Application Lifecycle Managment end-to-endHosam Kamel
 
End-To-End Visual Studio Application Lifecycle Management
End-To-End Visual Studio Application Lifecycle ManagementEnd-To-End Visual Studio Application Lifecycle Management
End-To-End Visual Studio Application Lifecycle ManagementHosam Kamel
 
Erp Implementation Methodology Wkshp 2.0 120611
Erp Implementation Methodology Wkshp 2.0 120611Erp Implementation Methodology Wkshp 2.0 120611
Erp Implementation Methodology Wkshp 2.0 120611John Paulson
 
How to bake in quality in agile scrum projects
How to bake in quality in agile scrum projectsHow to bake in quality in agile scrum projects
How to bake in quality in agile scrum projectsSantanu Bhattacharya
 
Microsoft ALM Platform Overview
Microsoft ALM Platform OverviewMicrosoft ALM Platform Overview
Microsoft ALM Platform OverviewSteve Lange
 
Lanzamiento Visual Studio 2012 - Modern ALM
Lanzamiento Visual Studio 2012 - Modern ALMLanzamiento Visual Studio 2012 - Modern ALM
Lanzamiento Visual Studio 2012 - Modern ALMDebora Di Piano
 
Ravit Danino HP - Roles and Collaboration in Agile
Ravit Danino HP - Roles and Collaboration in AgileRavit Danino HP - Roles and Collaboration in Agile
Ravit Danino HP - Roles and Collaboration in AgileAgileSparks
 
PCN Corporate Overview
PCN Corporate OverviewPCN Corporate Overview
PCN Corporate OverviewPCN Strategies
 
P&msp2010 09 integration-&-testing
P&msp2010 09 integration-&-testingP&msp2010 09 integration-&-testing
P&msp2010 09 integration-&-testingEmanuele Della Valle
 
Collaborative Lifecycle Managmenent - an Introduction
Collaborative Lifecycle Managmenent - an IntroductionCollaborative Lifecycle Managmenent - an Introduction
Collaborative Lifecycle Managmenent - an IntroductionStrongback Consulting
 

Ähnlich wie Behavior Driven Development (BDD) (20)

Session #1: Development Practices And The Microsoft Approach
Session #1: Development Practices And The Microsoft ApproachSession #1: Development Practices And The Microsoft Approach
Session #1: Development Practices And The Microsoft Approach
 
Agile Developers Create Their Own Identity
Agile Developers Create Their Own IdentityAgile Developers Create Their Own Identity
Agile Developers Create Their Own Identity
 
Agile developers create their own identity by Ajay Danait
Agile developers create their own identity by Ajay DanaitAgile developers create their own identity by Ajay Danait
Agile developers create their own identity by Ajay Danait
 
Agile Requirements by Agile Analysts
Agile Requirements by Agile AnalystsAgile Requirements by Agile Analysts
Agile Requirements by Agile Analysts
 
Application Lifecycle Management & VSTS
Application Lifecycle Management & VSTSApplication Lifecycle Management & VSTS
Application Lifecycle Management & VSTS
 
An Introduction to Software Performance Engineering
An Introduction to Software Performance EngineeringAn Introduction to Software Performance Engineering
An Introduction to Software Performance Engineering
 
Aras Innovator PLM Deployment Methodology
Aras Innovator PLM Deployment MethodologyAras Innovator PLM Deployment Methodology
Aras Innovator PLM Deployment Methodology
 
IBM Rational Software Conference 2009 Day 1 Keynote: Jamie Thomas
IBM Rational Software Conference 2009 Day 1 Keynote: Jamie ThomasIBM Rational Software Conference 2009 Day 1 Keynote: Jamie Thomas
IBM Rational Software Conference 2009 Day 1 Keynote: Jamie Thomas
 
Agile Developers Create Their Own Identity[1]
Agile Developers Create Their Own Identity[1]Agile Developers Create Their Own Identity[1]
Agile Developers Create Their Own Identity[1]
 
Visual Studio Application Lifecycle Managment end-to-end
Visual Studio Application Lifecycle Managment end-to-endVisual Studio Application Lifecycle Managment end-to-end
Visual Studio Application Lifecycle Managment end-to-end
 
End-To-End Visual Studio Application Lifecycle Management
End-To-End Visual Studio Application Lifecycle ManagementEnd-To-End Visual Studio Application Lifecycle Management
End-To-End Visual Studio Application Lifecycle Management
 
Erp Implementation Methodology Wkshp 2.0 120611
Erp Implementation Methodology Wkshp 2.0 120611Erp Implementation Methodology Wkshp 2.0 120611
Erp Implementation Methodology Wkshp 2.0 120611
 
How to bake in quality in agile scrum projects
How to bake in quality in agile scrum projectsHow to bake in quality in agile scrum projects
How to bake in quality in agile scrum projects
 
Microsoft ALM Platform Overview
Microsoft ALM Platform OverviewMicrosoft ALM Platform Overview
Microsoft ALM Platform Overview
 
Lanzamiento Visual Studio 2012 - Modern ALM
Lanzamiento Visual Studio 2012 - Modern ALMLanzamiento Visual Studio 2012 - Modern ALM
Lanzamiento Visual Studio 2012 - Modern ALM
 
Ravit Danino HP - Roles and Collaboration in Agile
Ravit Danino HP - Roles and Collaboration in AgileRavit Danino HP - Roles and Collaboration in Agile
Ravit Danino HP - Roles and Collaboration in Agile
 
PCN Corporate Overview
PCN Corporate OverviewPCN Corporate Overview
PCN Corporate Overview
 
P&msp2010 09 integration-&-testing
P&msp2010 09 integration-&-testingP&msp2010 09 integration-&-testing
P&msp2010 09 integration-&-testing
 
Eswaranand Attuluri CV
Eswaranand Attuluri CVEswaranand Attuluri CV
Eswaranand Attuluri CV
 
Collaborative Lifecycle Managmenent - an Introduction
Collaborative Lifecycle Managmenent - an IntroductionCollaborative Lifecycle Managmenent - an Introduction
Collaborative Lifecycle Managmenent - an Introduction
 

Kürzlich hochgeladen

What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 

Kürzlich hochgeladen (20)

What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 

Behavior Driven Development (BDD)

  • 1. Behavior Driven Development Ajay Danait Global Agile Strategist Stixis Technologies, Bangalore
  • 2. Co-Learning (Collaborative Learning)  Cross Functional Behavior (10 mins)  Evolution of Software Development Process (15 mins)  Behavior Driven Development (BDD) Concept (10 mins)  Behavior Driven Development (BDD) Semantics (15 mins)  Q & A (10 mins)
  • 3. Quick Survey While doing software development, who do you think like ... Like a … Plumber, Carpenter, Sculptor, Artist, Blacksmith, Hairdresser, Firefighter, Scientist, Archaeologist, Author, Typist
  • 4. Not Designations … But Roles Switch Caps Not Wear Crowns • Architect • Artist • Craftsman • Planner • Team Player • Critic • Engineer
  • 5. Team Organization and Governance Traditional Team Hierarchy (Crowns) vs. Cross-Functional Roles (Caps) Project Leadership System Architecture Tech Architect Test Architect Test Business Creation Analysis Data Tech Lead Test Lead Architect Facilitator Leader Designer Test Analyst Guide Test Coach Project Automation Management Automation Tester Developer Build & Application Business Release Development Analyst Management Crowns Caps  Creates and widens gap between people  Swapped depending on situations  Restricts knowledge sharing  Increase sense of collective ownership  Builds up power distance  Rotation of responsibilities improves knowledge sharing  Steep learning curve for increase in maturity  Open culture within the team
  • 6. Quick Opinion When do you say a software project has "failed" ?
  • 7. Failure symptoms / Failure causes Software delivered very late ... costed way more ... does the wrong thing ... unstable in production, crashes a lot ... code change breaks functionality ... new version cannot be released very often
  • 8. Traditional Software Delivery Process Why Do We Do This ?
  • 9. Inheriting Management Style from Traditional Industries  Fredrick Taylor  Edwards Deming / Taiichi Ohno  Taylorism (Scientific Management)  Deming Cycle / Lean Thinking (Work Management separation) (PDCA-Plan-Do-Check(Study)-Act)  Top Down  People need to be “managed”,  Bottom Up “controlled”, “monitored”.  People want to do a good job and take  Work needs to be made simple for pride in creativity. them or they will make mistakes. The  People respond well to an encouraging people downstream are increasingly environment of freedom and trust and dumb, pluggable / replaced. So, all the hence produce better results. “smartness” needed is loaded upfront in the form of “well-documented  People stress a lot on gaining artifacts” – requirements, designs, knowledge in the long term and improve user acceptance tests. their skills based on collaboration and apprenticeship.  Hence, there should be a proper knowledge transfer “handover” mechanism to make sure no data is lost in translation.  Also to “verify” based on documented evidence whether there are mistakes in the work that they do.
  • 11. Cost of Change from Traditional Industries  Lack of trust downstream  So we hedge  Detailed functional requirements  Big Design Up Front  Detailed UAT  Detailed Project Plan using Work Breakdown Structure until Task level  Discovering a defect / unexpected behavior  Causes increase in change and hence cost  To prevent this, we hedge with the phased process  We hedged so much to prevent high cost of change that we added steps that increase cost of change.
  • 13. Software Practices Inherited • V-Model Development Process • Upfront Detailed Planning • Fixed Scope Requirements (No changes) • Big Design Up Front • Hard Code (That cannot easily change) • Late Big Bang Integration • Limited Testing • Lots of handovers • Manual Deployments • Low Maintainability
  • 14. Software Delivery – Done Differently Vision Level Vision Statement V-Model to I-Model Goals (Changing a “waterfall” verification and validation testing mindset to spec-driven purpose fulfillment mindset) System / Product Level Executable Specifications Acceptance Feature Level Domain Driven Design Architecture Story Level Interface Driven Evolutionary Design Mocks Integration Scenario Level TDD / Unit Code-by-example Implementation
  • 15. Levels of Planning Who? Executive Mgmt. Vision Why? Product Management What? Product Product Owner Product Owner, When? Release Stakeholders, Team How? Iteration Product Owner, Team Daily Team
  • 16. What is different ? • Deliver features instead of modules • Prioritize often, change often • Focus on high value features • Flatten the cost of change • Adapt to feedback • Fail fast, fail safe (Learn from failure) • Better Learning • Better collaboration than handover
  • 17. Evolution of Software Practices • Adaptive Planning • Streamlined, Executable Specifications • Evolving Design (Just Enough Design) • Continuous Code Refactoring • Automated Acceptance Testing • Continuous Integration • Continuous Regression Testing • Continuous Automated Deployments • Highly Maintainable systems
  • 18. BDD – Behavior Driven Development
  • 19. Concept • Behavior-Driven Development (BDD) is a term used to classify a method to build software by describing the application behavior from the perspective of and what is of value to the stakeholders. • Other terms associated with same concept – o Agile Acceptance Testing o Acceptance Test-Driven Development o Example-Driven Development o Code By Example o Story Testing o Story Test-Driven Development o Specification By Example
  • 20. Communication Effectiveness 2 people at white board 2 people on phone 2 people on email Videotape Audiotape Document Form of Communication
  • 21. Definition by Dan North (Creator of BDD) “ Behavior-Driven Development (BDD) is a second-generation, outside-in, pull-based, multiple-stakeholder, multiple-scale, high- automation, agile methodology. It describes a cycle of interactions with well- defined outputs, resulting in the delivery of working, tested software. ”
  • 22. Second-Generation • Derived from TDD, Acceptance Test Driven Planning, Lean and Domain Driven Design • Concepts of Neuro-Linguistic Programming (NLP) and Systems Thinking
  • 23. Outside-In, Multiple-Scope, Vision Level Vision Statement Multiple Stakeholders Purpose Who? System / Product Vision Level Why? Goals / Outcomes / Capabilities BDD Specifications What? Product Feature Level When? Release Domain Driven Design Architecture How? Iteration Story Level Interface Driven Evolutionary Design Mocks Daily Scenario Level TDD Code-by-example Implementation
  • 24. Pull-based • Just-enough details • Diminishing returns • Deliberate Discovery
  • 26. BDD Principles • Just Enough • Deliver stakeholder value • Behavior only
  • 28. User Story Template As a [role] I want [feature] So that [benefit] Title [title of the story] In order to [benefit] A [role] Wants to [feature]
  • 29. User Story Example • Title: Register customers for VIP program In order to be able to do direct marketing of products to existing customers, a marketing manager wants customers to register personal details by joining a VIP program. • Title: Free delivery for VIP customers In order to entice existing customers to register for the VIP program, a marketing manager wants the system to offer free delivery on certain items to VIP customers.
  • 30. Scenario Template Title [title of the scenario] Given [some initial context / system State] And [more context / system State] When [an event occurs / user Action occurs] Then [ensure outcome / system Reaction] And [some outcomes / system Reactions]
  • 31. Scenario Template • Title: Register customers for VIP program Given the customer registered for VIP program When the customer adds 5 books in the cart Then the customer gets free delivery • Title: Register customers for VIP program Given the customer registered for VIP program When the customer adds 4 books in the cart Then the customer does not get free delivery And the customer gets standard delivery • Title: Register customers for VIP program Given the customer registered for VIP program When the customer adds 5 washing machines in the cart Then the customer does not get free delivery And the customer gets standard delivery
  • 32. User Story & Scenario Example • Title: Customer withdraws cash In order to not want to wait in line at the bank, a customer wants to withdraw cash from the bank ATM • Title: Account is in credit Given the account is in credit And the card is valid And the dispenser contains cash When the customer request for cash withdrawal Then ensure the account is debited And ensure the cash is dispensed And ensure the card is returned
  • 33. User Story & Scenario Example • Title: Customer withdraws cash In order to not want to wait in line at the bank, a customer wants to withdraw cash from the bank ATM • Title: Account is overdrawn past the overdraft limit Given the account is overdrawn And the card is valid When the customer request for cash withdrawal Then ensure a rejection message is displayed And ensure the cash is not dispensed And ensure the card is returned
  • 34. BDD Characteristics • Ubiquitous Language • Iterative Decomposition Process • Plain text description using Story and Scenarios templates • Automated Acceptance Testing with Mapping Rules • Readable Behavior Oriented Specification & code • Behavior Driven at different levels
  • 35. BDD Conceptual Model - A Study of the Characteristics of Behavior Driven Development - by Carlos Solís & Xiaofeng Wang
  • 38. BDD Mind Map - by Dan North
  • 39. BDD Tools • JBehave, NBehave • RSpec, MSpec • StoryQ, Cucumber, SpecFlow
  • 40. BDD Anti-Patterns • BDD is a framework with keywords & flavors • BDD is for defining system behavior and TDD for lower level components • BDD is for business applications and TDD is for API libraries • BDD is too explicit, verbose. • BDD is for higher level, TDD is for lower level • BDD is for integration testing, TDD is for unit testing • BDD is outside-in, TDD is inside-out.
  • 41. BDD comparison with Finite State Machine (FSM) • Sequence Pattern • Parallel Split Pattern
  • 42. BDD comparison with Finite State Machine (FSM) • Synchronization Pattern
  • 43. BDD comparison with Finite State Machine (FSM) • Exclusive Choice Pattern
  • 44. BDD comparison with Finite State Machine (FSM) • Simple Merge Pattern
  • 45. BDD comparison with Finite State Machine (FSM) • Multiple Choice Pattern
  • 46. BDD comparison with Finite State Machine (FSM) • Synchronization Merge Pattern
  • 47. BDD comparison with Finite State Machine (FSM) • Multiple Merge Pattern
  • 48. Thank You Ajay Danait Global Agile Strategist Stixis Technologies, Bangalore