SlideShare une entreprise Scribd logo
1  sur  32
Télécharger pour lire hors ligne
Behavior Driven
 Development
    Chun-Wen Wang
     Aug 21, 2007
Background
TDD
Test Driven
Development
Problem
Developers don’t know ...

• where to start
• what to test
• what not to test
• how much to test in one go
• what to call tests
• how to fix a broken test
• that TDD is about design
Test?
Assert?
Sapir-Whorf
  hypothesis
BDD
Behavior Driven Development


• It’s about writing specifications
• It’s about writing how the code works
• It’s about understanding how the system
  works
• It’s about understanding what I have to write
BDD helps you realize

•                                •
    where to start                   outside-in
•                                •
    what to test                     user stories
•                                •
    what not to test                 anything else
•                                •
    how much to test in one go       as little as possible
•                                •
    what to call tests               intent
•                                •
    how to fix a broken test          documentation
•                                •
    that TDD is about design         ......?!
Behavior

• The actions or reactions of an object or
  organism, usually in relation to the
  environment. -- Wikipedia


• Anything that an organism does involving
  action and response to stimulation. --
  Merriam-Webster
Example: Stack


• Stack
 • as empty stack, ....
 • as full Stack, ....
 • neither empty nor full, ....
Example: Stack


•                                    Specification
    Stack
    • as empty stack, ....
    • as full Stack, ....
    • neither empty nor full, ....
Example: Stack


• Stack                           Context
 • as empty stack, ....
 • as full Stack, ....
 • neither empty nor full, ....
Example: Stack


• Stack
 • as empty stack, ....           Behavior
 • as full Stack, ....
 • neither empty nor full, ....
Behavior of Empty Stack


• Empty stack
 • is empty
 • is no longer empty after push
 • ...
Behavior of Empty Stack


• Empty stack                      Context
 • is empty                        Behavior
 • is no longer empty after push
 • ...
How to Do It?

• JBehave - 1.0.1
 • http://jbehave.org/
• JDave - 0.9.0
 • http://www.jdave.org/
• Instinct - 0.1.4
 • http://code.google.com/p/instinct/
Example (JDave)
<   >
Example using RSpec
</   >
Further More
Discussed    Not yet




       Module
      Under Test
Mock Objects
... aren’t Stubs
To be continued...
Q &A

Contenu connexe

Tendances (20)

JUAN CARLOS IBARRA RODRIGUEZ
JUAN CARLOS IBARRA RODRIGUEZJUAN CARLOS IBARRA RODRIGUEZ
JUAN CARLOS IBARRA RODRIGUEZ
 
Archivo ii
Archivo iiArchivo ii
Archivo ii
 
Archivo de prueba word
Archivo de prueba word Archivo de prueba word
Archivo de prueba word
 
Tecnologias de la investigacion juridica
Tecnologias de la investigacion juridicaTecnologias de la investigacion juridica
Tecnologias de la investigacion juridica
 
Archivo word
Archivo wordArchivo word
Archivo word
 
Practica de Slidershare
Practica de SlidersharePractica de Slidershare
Practica de Slidershare
 
Archivo de prueba 1
Archivo de prueba 1Archivo de prueba 1
Archivo de prueba 1
 
Archivo2
Archivo2Archivo2
Archivo2
 
Pratica de slideshare
Pratica de slidesharePratica de slideshare
Pratica de slideshare
 
Practicaword
PracticawordPracticaword
Practicaword
 
Archivo de prueba de word
Archivo de prueba de word Archivo de prueba de word
Archivo de prueba de word
 
Portada Word
Portada WordPortada Word
Portada Word
 
Archivo prueba word 1
Archivo prueba word 1Archivo prueba word 1
Archivo prueba word 1
 
Rossy
RossyRossy
Rossy
 
PRACTICA WORD
PRACTICA WORDPRACTICA WORD
PRACTICA WORD
 
Practica slideshar1
Practica slideshar1Practica slideshar1
Practica slideshar1
 
Universidad autonoma de baja california
Universidad autonoma de baja californiaUniversidad autonoma de baja california
Universidad autonoma de baja california
 
Practica de prueba2
Practica de prueba2Practica de prueba2
Practica de prueba2
 
Word slide
Word slideWord slide
Word slide
 
Practica de prueba
Practica de pruebaPractica de prueba
Practica de prueba
 

En vedette (6)

Wedding2
Wedding2Wedding2
Wedding2
 
Visual Studio and the git workflow
Visual Studio and the git workflowVisual Studio and the git workflow
Visual Studio and the git workflow
 
Exploring Git in Visual Studio 2013
Exploring Git in Visual Studio 2013Exploring Git in Visual Studio 2013
Exploring Git in Visual Studio 2013
 
Chicago alm user group tfs version control poster - tfvc and git
Chicago alm user group   tfs version control poster - tfvc and gitChicago alm user group   tfs version control poster - tfvc and git
Chicago alm user group tfs version control poster - tfvc and git
 
La gastronomía española
La gastronomía españolaLa gastronomía española
La gastronomía española
 
Proyecto paises spanish speaking countries - poster board 2013
Proyecto paises   spanish speaking countries - poster board 2013Proyecto paises   spanish speaking countries - poster board 2013
Proyecto paises spanish speaking countries - poster board 2013
 

Similaire à Behavior Driven Development

PHX Session #3 - "It Works on My Machine!" Closing the Loop Between Developme...
PHX Session #3 - "It Works on My Machine!" Closing the Loop Between Developme...PHX Session #3 - "It Works on My Machine!" Closing the Loop Between Developme...
PHX Session #3 - "It Works on My Machine!" Closing the Loop Between Developme...
Steve Lange
 
OSCON2008 Full-stack Introspection Crash Course
OSCON2008 Full-stack Introspection Crash CourseOSCON2008 Full-stack Introspection Crash Course
OSCON2008 Full-stack Introspection Crash Course
guestaeae3b
 

Similaire à Behavior Driven Development (20)

BDD & Rspec
BDD & Rspec BDD & Rspec
BDD & Rspec
 
Mlw
MlwMlw
Mlw
 
PHX Session #3 - "It Works on My Machine!" Closing the Loop Between Developme...
PHX Session #3 - "It Works on My Machine!" Closing the Loop Between Developme...PHX Session #3 - "It Works on My Machine!" Closing the Loop Between Developme...
PHX Session #3 - "It Works on My Machine!" Closing the Loop Between Developme...
 
Test Driven Development SpeedRun
Test Driven Development SpeedRunTest Driven Development SpeedRun
Test Driven Development SpeedRun
 
OSCON2008 Full-stack Introspection Crash Course
OSCON2008 Full-stack Introspection Crash CourseOSCON2008 Full-stack Introspection Crash Course
OSCON2008 Full-stack Introspection Crash Course
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Better Perl Practices
Better Perl PracticesBetter Perl Practices
Better Perl Practices
 
Exploratory Testing
Exploratory TestingExploratory Testing
Exploratory Testing
 
Selected Sessions from RailsConf 2007
Selected Sessions from RailsConf 2007Selected Sessions from RailsConf 2007
Selected Sessions from RailsConf 2007
 
B D D Intro
B D D  IntroB D D  Intro
B D D Intro
 
Mpg Feb08 Gian Lorenzetto
Mpg Feb08 Gian Lorenzetto Mpg Feb08 Gian Lorenzetto
Mpg Feb08 Gian Lorenzetto
 
Digital preservation and institutional repositories
Digital preservation and institutional repositoriesDigital preservation and institutional repositories
Digital preservation and institutional repositories
 
Better Testing Through Behaviour
Better Testing Through BehaviourBetter Testing Through Behaviour
Better Testing Through Behaviour
 
Story Driven Development
Story Driven DevelopmentStory Driven Development
Story Driven Development
 
Usability
UsabilityUsability
Usability
 
Practical project automation
Practical project automationPractical project automation
Practical project automation
 
Interviews
InterviewsInterviews
Interviews
 
Session #3: "It Works on My Machine!" Closing the Loop Between Development & ...
Session #3: "It Works on My Machine!" Closing the Loop Between Development & ...Session #3: "It Works on My Machine!" Closing the Loop Between Development & ...
Session #3: "It Works on My Machine!" Closing the Loop Between Development & ...
 
Building a site for people with big imaginations
Building a site for people with big imaginationsBuilding a site for people with big imaginations
Building a site for people with big imaginations
 
How to avoid drastic project change (using stochastic stability)
How to avoid drastic project change (using stochastic stability)How to avoid drastic project change (using stochastic stability)
How to avoid drastic project change (using stochastic stability)
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 

Behavior Driven Development