SlideShare una empresa de Scribd logo
1 de 17
Descargar para leer sin conexión
BDD
                             programming the happy way
                                     by Leon Du




Friday, September 10, 2010
Who Am I
                     • Freelancer / Ruby on Rails developer
                             @guangzhou
                     • github.com/leondu
                     • twitter.com/leondu
                     • flickr.com/leondu
                     • leondu@gmail.com
Friday, September 10, 2010
Talk about
        BDD, aka, 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 that matters.
                                                                                                        --- from wikipedia.org



                     •       a set of   tools
                             Rspec
                             Cucumber
                             Webrat
                             Capybara
                             email-spec




Friday, September 10, 2010
Methodology

                     • Change the way of development
                     • Focus on behavior not only internal
                             structure
                     • Ease the difficulty of communication


Friday, September 10, 2010
BDD Cycle


                                Text




                                       ---from The RSpec Book
Friday, September 10, 2010
---from The RSpec Book
Friday, September 10, 2010
the Tools

                     • RSpec
                             for internal behaviors
                     • Cucumber
                             for system behaviors
                     • Webrat/Capybara/email-spec...
                             for common task steps



Friday, September 10, 2010
Cucumber




Friday, September 10, 2010
Cucumber
                             Cucumber

                               Features
                                 Scenarios

                                        Steps




                                  http://cukes.info/
Friday, September 10, 2010
Feature
                     • Plain text
                     • Focus on behavior




Friday, September 10, 2010
Scenario
                     • Write Scenario with Given/When/Then




Friday, September 10, 2010
Step
  Step definition



 and is translated to below:




Friday, September 10, 2010
Advance topics
                Preparing data with Examples




Friday, September 10, 2010
Advance topics
                Testing email with email-spec




                email steps




Friday, September 10, 2010
BDD in other world
                     • Java
                             Instinct, JDave, JBehave, BDoc...
                             http://java-sources.org/open-source/bdd


                     • .Net
                             StoryQ
                             http://storyq.codeplex.com/
                             http://www.codeproject.com/KB/testing/bddintro.aspx




Friday, September 10, 2010
Special Thanks To
                             Rain Chen hirainchen@gmail.com




Friday, September 10, 2010
Questions?


Friday, September 10, 2010

Más contenido relacionado

Destacado

Letter of recommendation - Tomasz Blaszczyk
Letter of recommendation - Tomasz BlaszczykLetter of recommendation - Tomasz Blaszczyk
Letter of recommendation - Tomasz BlaszczykTomasz Błaszczyk
 
FibroLAN Introduction 2011
FibroLAN Introduction 2011FibroLAN Introduction 2011
FibroLAN Introduction 2011Jorge Rzezak
 
Dutch grammar version 1.1 es
Dutch grammar version 1.1 esDutch grammar version 1.1 es
Dutch grammar version 1.1 esValentina Kawtig
 
Interstuhl Healthy Sitting.Pptpower Point Update.Pptxjulia 2010
Interstuhl Healthy Sitting.Pptpower Point Update.Pptxjulia 2010Interstuhl Healthy Sitting.Pptpower Point Update.Pptxjulia 2010
Interstuhl Healthy Sitting.Pptpower Point Update.Pptxjulia 2010AnitaRyan
 
Mobile Sports Group Case Studies Package 7
Mobile Sports Group Case Studies   Package 7Mobile Sports Group Case Studies   Package 7
Mobile Sports Group Case Studies Package 7Rick Furr
 
o10media - Centros de estética y belleza de Zaragoza en google
o10media - Centros de estética y belleza de Zaragoza en googleo10media - Centros de estética y belleza de Zaragoza en google
o10media - Centros de estética y belleza de Zaragoza en googleo10media
 
Amplexor Romania Presentation
Amplexor Romania PresentationAmplexor Romania Presentation
Amplexor Romania PresentationAmplexor
 
Visita de la Receita Federal de Brasil. Gestión de Notificaciones y NEO / Man...
Visita de la Receita Federal de Brasil. Gestión de Notificaciones y NEO / Man...Visita de la Receita Federal de Brasil. Gestión de Notificaciones y NEO / Man...
Visita de la Receita Federal de Brasil. Gestión de Notificaciones y NEO / Man...EUROsociAL II
 
Transferencia de calor
Transferencia de calorTransferencia de calor
Transferencia de calorRobert Ramos
 
Presentación Action Coach
Presentación  Action CoachPresentación  Action Coach
Presentación Action CoachOCANDOL
 
GJP Hotels & Resorts - Revista Fevereiro 2014
GJP Hotels & Resorts - Revista Fevereiro 2014GJP Hotels & Resorts - Revista Fevereiro 2014
GJP Hotels & Resorts - Revista Fevereiro 2014GJP Hotels & Resorts
 

Destacado (16)

Letter of recommendation - Tomasz Blaszczyk
Letter of recommendation - Tomasz BlaszczykLetter of recommendation - Tomasz Blaszczyk
Letter of recommendation - Tomasz Blaszczyk
 
3.hid
3.hid3.hid
3.hid
 
FibroLAN Introduction 2011
FibroLAN Introduction 2011FibroLAN Introduction 2011
FibroLAN Introduction 2011
 
Dutch grammar version 1.1 es
Dutch grammar version 1.1 esDutch grammar version 1.1 es
Dutch grammar version 1.1 es
 
Interstuhl Healthy Sitting.Pptpower Point Update.Pptxjulia 2010
Interstuhl Healthy Sitting.Pptpower Point Update.Pptxjulia 2010Interstuhl Healthy Sitting.Pptpower Point Update.Pptxjulia 2010
Interstuhl Healthy Sitting.Pptpower Point Update.Pptxjulia 2010
 
Mobile Sports Group Case Studies Package 7
Mobile Sports Group Case Studies   Package 7Mobile Sports Group Case Studies   Package 7
Mobile Sports Group Case Studies Package 7
 
o10media - Centros de estética y belleza de Zaragoza en google
o10media - Centros de estética y belleza de Zaragoza en googleo10media - Centros de estética y belleza de Zaragoza en google
o10media - Centros de estética y belleza de Zaragoza en google
 
Amplexor Romania Presentation
Amplexor Romania PresentationAmplexor Romania Presentation
Amplexor Romania Presentation
 
Lineas electricas
Lineas electricasLineas electricas
Lineas electricas
 
Amway
AmwayAmway
Amway
 
Visita de la Receita Federal de Brasil. Gestión de Notificaciones y NEO / Man...
Visita de la Receita Federal de Brasil. Gestión de Notificaciones y NEO / Man...Visita de la Receita Federal de Brasil. Gestión de Notificaciones y NEO / Man...
Visita de la Receita Federal de Brasil. Gestión de Notificaciones y NEO / Man...
 
Empresa 2.0 y recursos humanos
Empresa 2.0 y recursos humanosEmpresa 2.0 y recursos humanos
Empresa 2.0 y recursos humanos
 
Transferencia de calor
Transferencia de calorTransferencia de calor
Transferencia de calor
 
Pprincipales mineras
Pprincipales minerasPprincipales mineras
Pprincipales mineras
 
Presentación Action Coach
Presentación  Action CoachPresentación  Action Coach
Presentación Action Coach
 
GJP Hotels & Resorts - Revista Fevereiro 2014
GJP Hotels & Resorts - Revista Fevereiro 2014GJP Hotels & Resorts - Revista Fevereiro 2014
GJP Hotels & Resorts - Revista Fevereiro 2014
 

Similar a BDD and Cucumber at barcampGZ

Solit 2013, Behaviour Driven Development, Ихелис Александр
Solit 2013, Behaviour Driven Development, Ихелис АлександрSolit 2013, Behaviour Driven Development, Ихелис Александр
Solit 2013, Behaviour Driven Development, Ихелис Александрsolit
 
Mirah & Dubious Talk Ruby|Web 2010
Mirah & Dubious Talk Ruby|Web 2010Mirah & Dubious Talk Ruby|Web 2010
Mirah & Dubious Talk Ruby|Web 2010baroquebobcat
 
Web Development With Ruby - From Simple To Complex
Web Development With Ruby - From Simple To ComplexWeb Development With Ruby - From Simple To Complex
Web Development With Ruby - From Simple To ComplexBrian Hogan
 
When is a Website Not Enough? Now.
When is a Website Not Enough? Now.When is a Website Not Enough? Now.
When is a Website Not Enough? Now.bethgsanders
 
Debugging your JavaScript
Debugging your JavaScriptDebugging your JavaScript
Debugging your JavaScriptDiogo Antunes
 
OvertheAir 2010 html5 impact on application programming
OvertheAir 2010 html5 impact on application programmingOvertheAir 2010 html5 impact on application programming
OvertheAir 2010 html5 impact on application programmingTor Björn Minde
 
HTML5 impact on application programming
HTML5 impact on application programmingHTML5 impact on application programming
HTML5 impact on application programmingEricsson Labs
 
Sencha Touch beta — Amazing Mobile Web Apps with HTML5, CSS3 & JavaScript
Sencha Touch beta — Amazing Mobile Web Apps with HTML5, CSS3 & JavaScriptSencha Touch beta — Amazing Mobile Web Apps with HTML5, CSS3 & JavaScript
Sencha Touch beta — Amazing Mobile Web Apps with HTML5, CSS3 & JavaScriptDavid Kaneda
 
Dr. Strangelove: or How I learned to love HTML, CSS, and Javascript
Dr. Strangelove: or How I learned to love HTML, CSS, and JavascriptDr. Strangelove: or How I learned to love HTML, CSS, and Javascript
Dr. Strangelove: or How I learned to love HTML, CSS, and JavascriptRobotDeathSquad
 
She saysdigiprodcrsetools2 23_sep_2011
She saysdigiprodcrsetools2 23_sep_2011She saysdigiprodcrsetools2 23_sep_2011
She saysdigiprodcrsetools2 23_sep_2011SheSays US
 
HTML5: Toolkits and Gaps
HTML5: Toolkits and GapsHTML5: Toolkits and Gaps
HTML5: Toolkits and Gapsdylanks
 
Introduction to DZone
Introduction to DZoneIntroduction to DZone
Introduction to DZoneBrandon Hoe
 
Jeff mc cune sf 2010
Jeff mc cune sf 2010Jeff mc cune sf 2010
Jeff mc cune sf 2010Puppet
 
Aegir one drupal to rule them all
Aegir one drupal to rule them allAegir one drupal to rule them all
Aegir one drupal to rule them allDevelopment Seed
 
A web sized education problem?
A web sized education problem?A web sized education problem?
A web sized education problem?Chris Mills
 
SDEC10-Bdd-quality-driven
SDEC10-Bdd-quality-drivenSDEC10-Bdd-quality-driven
SDEC10-Bdd-quality-drivenAmir Barylko
 

Similar a BDD and Cucumber at barcampGZ (20)

Solit 2013, Behaviour Driven Development, Ихелис Александр
Solit 2013, Behaviour Driven Development, Ихелис АлександрSolit 2013, Behaviour Driven Development, Ихелис Александр
Solit 2013, Behaviour Driven Development, Ихелис Александр
 
Mirah & Dubious Talk Ruby|Web 2010
Mirah & Dubious Talk Ruby|Web 2010Mirah & Dubious Talk Ruby|Web 2010
Mirah & Dubious Talk Ruby|Web 2010
 
Web Development With Ruby - From Simple To Complex
Web Development With Ruby - From Simple To ComplexWeb Development With Ruby - From Simple To Complex
Web Development With Ruby - From Simple To Complex
 
When is a Website Not Enough? Now.
When is a Website Not Enough? Now.When is a Website Not Enough? Now.
When is a Website Not Enough? Now.
 
Debugging your JavaScript
Debugging your JavaScriptDebugging your JavaScript
Debugging your JavaScript
 
OvertheAir 2010 html5 impact on application programming
OvertheAir 2010 html5 impact on application programmingOvertheAir 2010 html5 impact on application programming
OvertheAir 2010 html5 impact on application programming
 
HTML5 impact on application programming
HTML5 impact on application programmingHTML5 impact on application programming
HTML5 impact on application programming
 
Sencha Touch beta — Amazing Mobile Web Apps with HTML5, CSS3 & JavaScript
Sencha Touch beta — Amazing Mobile Web Apps with HTML5, CSS3 & JavaScriptSencha Touch beta — Amazing Mobile Web Apps with HTML5, CSS3 & JavaScript
Sencha Touch beta — Amazing Mobile Web Apps with HTML5, CSS3 & JavaScript
 
CSS Bloat!
CSS Bloat!CSS Bloat!
CSS Bloat!
 
Vagrant at LA Ruby
Vagrant at LA RubyVagrant at LA Ruby
Vagrant at LA Ruby
 
Dr. Strangelove: or How I learned to love HTML, CSS, and Javascript
Dr. Strangelove: or How I learned to love HTML, CSS, and JavascriptDr. Strangelove: or How I learned to love HTML, CSS, and Javascript
Dr. Strangelove: or How I learned to love HTML, CSS, and Javascript
 
Slideshare presentation
Slideshare presentationSlideshare presentation
Slideshare presentation
 
She saysdigiprodcrsetools2 23_sep_2011
She saysdigiprodcrsetools2 23_sep_2011She saysdigiprodcrsetools2 23_sep_2011
She saysdigiprodcrsetools2 23_sep_2011
 
Eclipse community management - fossa2010
Eclipse community management - fossa2010Eclipse community management - fossa2010
Eclipse community management - fossa2010
 
HTML5: Toolkits and Gaps
HTML5: Toolkits and GapsHTML5: Toolkits and Gaps
HTML5: Toolkits and Gaps
 
Introduction to DZone
Introduction to DZoneIntroduction to DZone
Introduction to DZone
 
Jeff mc cune sf 2010
Jeff mc cune sf 2010Jeff mc cune sf 2010
Jeff mc cune sf 2010
 
Aegir one drupal to rule them all
Aegir one drupal to rule them allAegir one drupal to rule them all
Aegir one drupal to rule them all
 
A web sized education problem?
A web sized education problem?A web sized education problem?
A web sized education problem?
 
SDEC10-Bdd-quality-driven
SDEC10-Bdd-quality-drivenSDEC10-Bdd-quality-driven
SDEC10-Bdd-quality-driven
 

BDD and Cucumber at barcampGZ

  • 1. BDD programming the happy way by Leon Du Friday, September 10, 2010
  • 2. Who Am I • Freelancer / Ruby on Rails developer @guangzhou • github.com/leondu • twitter.com/leondu • flickr.com/leondu • leondu@gmail.com Friday, September 10, 2010
  • 3. Talk about BDD, aka, 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 that matters. --- from wikipedia.org • a set of tools Rspec Cucumber Webrat Capybara email-spec Friday, September 10, 2010
  • 4. Methodology • Change the way of development • Focus on behavior not only internal structure • Ease the difficulty of communication Friday, September 10, 2010
  • 5. BDD Cycle Text ---from The RSpec Book Friday, September 10, 2010
  • 6. ---from The RSpec Book Friday, September 10, 2010
  • 7. the Tools • RSpec for internal behaviors • Cucumber for system behaviors • Webrat/Capybara/email-spec... for common task steps Friday, September 10, 2010
  • 9. Cucumber Cucumber Features Scenarios Steps http://cukes.info/ Friday, September 10, 2010
  • 10. Feature • Plain text • Focus on behavior Friday, September 10, 2010
  • 11. Scenario • Write Scenario with Given/When/Then Friday, September 10, 2010
  • 12. Step Step definition and is translated to below: Friday, September 10, 2010
  • 13. Advance topics Preparing data with Examples Friday, September 10, 2010
  • 14. Advance topics Testing email with email-spec email steps Friday, September 10, 2010
  • 15. BDD in other world • Java Instinct, JDave, JBehave, BDoc... http://java-sources.org/open-source/bdd • .Net StoryQ http://storyq.codeplex.com/ http://www.codeproject.com/KB/testing/bddintro.aspx Friday, September 10, 2010
  • 16. Special Thanks To Rain Chen hirainchen@gmail.com Friday, September 10, 2010